質問編集履歴

5

privateの変更

2020/09/21 03:05

投稿

tomo_345
tomo_345

スコア0

test CHANGED
File without changes
test CHANGED
@@ -66,7 +66,7 @@
66
66
 
67
67
  resources :likes, only: [:create, :destroy]
68
68
 
69
- resources :comments, only: :create
69
+ resources :comments, only: [:new, :create]
70
70
 
71
71
  end
72
72
 
@@ -106,8 +106,6 @@
106
106
 
107
107
  end
108
108
 
109
- end
110
-
111
109
 
112
110
 
113
111
  private
@@ -120,6 +118,14 @@
120
118
 
121
119
  end
122
120
 
121
+
122
+
123
+ end
124
+
125
+
126
+
127
+
128
+
123
129
  ```
124
130
 
125
131
 

4

urlの変更

2020/09/21 03:05

投稿

tomo_345
tomo_345

スコア0

test CHANGED
File without changes
test CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  ###エラー文の画像
20
20
 
21
- ![エラー文](https://gyazo.com/6ee4c1f910658b903b2bd004a0effb6f)
21
+ https://gyazo.com/6ee4c1f910658b903b2bd004a0effb6f
22
22
 
23
23
 
24
24
 

3

urlの変更

2020/09/21 02:05

投稿

tomo_345
tomo_345

スコア0

test CHANGED
File without changes
test CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  ###エラー文の画像
20
20
 
21
- https://gyazo.com/6ee4c1f910658b903b2bd004a0effb6f
21
+ ![エラー文](https://gyazo.com/6ee4c1f910658b903b2bd004a0effb6f)
22
22
 
23
23
 
24
24
 

2

エラー文のurlの添付とshow.html.erbの全体コードを記載しました。

2020/09/21 02:03

投稿

tomo_345
tomo_345

スコア0

test CHANGED
File without changes
test CHANGED
@@ -14,6 +14,14 @@
14
14
 
15
15
  ### 該当のソースコード
16
16
 
17
+
18
+
19
+ ###エラー文の画像
20
+
21
+ https://gyazo.com/6ee4c1f910658b903b2bd004a0effb6f
22
+
23
+
24
+
17
25
  ###_comment.html.erb
18
26
 
19
27
  ```
@@ -120,9 +128,67 @@
120
128
 
121
129
  ```
122
130
 
131
+ <header>
132
+
133
+ <div class="header-inner">
134
+
135
+ <h1>アプリ名</h1>
136
+
137
+ <nav class="header-nav">
138
+
139
+ <ul class="header-nav-list">
140
+
141
+ <% if user_signed_in? && @idea.user_id == current_user.id %>
142
+
143
+ <li><%= link_to '編集', edit_idea_path, class: "header-nav-list-item" %></li>
144
+
145
+ <li><%= link_to '削除', idea_path, method: :delete, class: "header-nav-list-item", data: { confirm: '削除しますか?' } %></li>
146
+
147
+ <% end %>
148
+
149
+ </ul>
150
+
151
+ </nav>
152
+
153
+ </div>
154
+
155
+ </header>
156
+
157
+
158
+
159
+ <div class="show">
160
+
161
+ <div class="idea-show">
162
+
163
+ <div class="idea-title">
164
+
165
+ <h1 class="title">
166
+
167
+ <%= @idea.title %>
168
+
169
+ </h1>
170
+
171
+ </div>
172
+
173
+ <div class="idea-img">
174
+
175
+ <%= image_tag @idea.image, class: "idea-image" if @idea.image.attached? %>
176
+
177
+ </div>
178
+
179
+ <div class="idea-content">
180
+
181
+ <%= @idea.content %>
182
+
183
+ </div>
184
+
185
+ <%= render 'shared/like', locals: { idea: @idea } %>
186
+
123
- <%= render 'shared/comment', locals: {idea: @idea } %>
187
+ <%= render 'shared/comment', locals: {idea: @idea } %>
124
-
188
+
125
- # 詳細ページでのコメントの部分テンプレートの呼び出しです。
189
+ </div>
190
+
191
+ </div>
126
192
 
127
193
  ```
128
194
 

1

誤字

2020/09/21 01:26

投稿

tomo_345
tomo_345

スコア0

test CHANGED
File without changes
test CHANGED
@@ -264,7 +264,9 @@
264
264
 
265
265
  ###path
266
266
 
267
+ ```
268
+
267
- Prefix Verb URI Pattern Controller#Action
269
+ Prefix Verb URI Pattern Controller#Action
268
270
 
269
271
  new_user_session GET /users/sign_in(.:format) devise/sessions#new
270
272
 
@@ -319,3 +321,5 @@
319
321
  PUT /ideas/:id(.:format) ideas#update
320
322
 
321
323
  DELETE /ideas/:id(.:format) ideas#destroy
324
+
325
+ ```