Skip to content

Commit d204a40

Browse files
committed
rails g controller attachments show
1 parent a3fc7f6 commit d204a40

File tree

5 files changed

+19
-0
lines changed

5 files changed

+19
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class AttachmentsController < ApplicationController
2+
def show
3+
end
4+
end

app/helpers/attachments_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module AttachmentsHelper
2+
end
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div>
2+
<h1 class="font-bold text-4xl">Attachments#show</h1>
3+
<p>Find me in app/views/attachments/show.html.erb</p>
4+
</div>

config/routes.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Rails.application.routes.draw do
2+
get "attachments/show"
23
resources :messages
34
get '/:list_name/:list_seq', to: 'messages#show'
45
get '/:list_name/', to: 'messages#index'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require "test_helper"
2+
3+
class AttachmentsControllerTest < ActionDispatch::IntegrationTest
4+
test "should get show" do
5+
get attachments_show_url
6+
assert_response :success
7+
end
8+
end

0 commit comments

Comments
 (0)