質問編集履歴

3

エラー内容の名前を変更した。

2019/11/25 12:42

投稿

nasuk47
nasuk47

スコア311

test CHANGED
File without changes
test CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  NoMethodError in Comments#show
24
24
 
25
- Showing /Users/nasutakumi/projects/travel-nogizaka/app/views/comments/show.html.haml where line #15 raised:
25
+ Showing /app/views/comments/show.html.haml where line #15 raised:
26
26
 
27
27
  undefined method `likes' for nil:NilClass
28
28
 

2

viewを追加しました

2019/11/25 12:42

投稿

nasuk47
nasuk47

スコア311

test CHANGED
File without changes
test CHANGED
@@ -304,6 +304,32 @@
304
304
 
305
305
  ```
306
306
 
307
+ ```haml
308
+
309
+ .contents
310
+
311
+ - @comments.each do |comment|
312
+
313
+ .content
314
+
315
+ .content__left
316
+
317
+ .content__left--place
318
+
319
+ = comment.place
320
+
321
+ .content__right
322
+
323
+ .content__right-name
324
+
325
+ - comment.member.each do |member|
326
+
327
+ = member.name
328
+
329
+ =link_to '詳細', "comments/#{comment.id}", method: :get
330
+
331
+ ```
332
+
307
333
  ### 試したこと
308
334
 
309
335
 

1

エラーメッセージを追加しました

2019/11/25 12:21

投稿

nasuk47
nasuk47

スコア311

test CHANGED
File without changes
test CHANGED
@@ -22,6 +22,8 @@
22
22
 
23
23
  NoMethodError in Comments#show
24
24
 
25
+ Showing /Users/nasutakumi/projects/travel-nogizaka/app/views/comments/show.html.haml where line #15 raised:
26
+
25
27
  undefined method `likes' for nil:NilClass
26
28
 
27
29
  ```