質問編集履歴
2
エラー文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -13,6 +13,8 @@
|
|
13
13
|
### 発生している問題・エラーメッセージ
|
14
14
|
|
15
15
|
ActionController::UrlGenerationError in Pages#home
|
16
|
+
|
17
|
+
Showing /app/views/likes/_likes.html.erb where line #9 raised:
|
16
18
|
|
17
19
|
No route matches {:action=>"create", :controller=>"likes", :micropost_id=>nil}, missing required keys: [:micropost_id]
|
18
20
|
|
1
エラー文の追加、コードの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
### 発生している問題・エラーメッセージ
|
14
14
|
|
15
|
-
|
15
|
+
ActionController::UrlGenerationError in Pages#home
|
16
16
|
|
17
17
|
No route matches {:action=>"create", :controller=>"likes", :micropost_id=>nil}, missing required keys: [:micropost_id]
|
18
18
|
|
@@ -23,6 +23,12 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
該当のお気にりフォームコード
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
``````ここに言語を入力
|
26
32
|
|
27
33
|
<% if @micropost.like_user(current_user.id) %>
|
28
34
|
|
@@ -54,11 +60,15 @@
|
|
54
60
|
|
55
61
|
<% end %>
|
56
62
|
|
63
|
+
```
|
64
|
+
|
57
65
|
|
58
66
|
|
59
67
|
エラー該当のhome_controller
|
60
68
|
|
61
69
|
|
70
|
+
|
71
|
+
```ここに言語を入力
|
62
72
|
|
63
73
|
before_action :logged_in_user, only: [:home]
|
64
74
|
|
@@ -71,6 +81,8 @@
|
|
71
81
|
@likes = Like.where(micropost_id: params[:micropost_id])
|
72
82
|
|
73
83
|
end
|
84
|
+
|
85
|
+
```
|
74
86
|
|
75
87
|
|
76
88
|
|