回答編集履歴
1
修正
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
def create
|
18
18
|
|
19
|
-
@post =
|
19
|
+
@post = Post.find(params[:post_id])
|
20
20
|
|
21
21
|
current_user.likes.create!(post_id: @post.id)
|
22
22
|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
def destroy
|
28
28
|
|
29
|
-
@post =
|
29
|
+
@post = Post.find(params[:post_id])
|
30
30
|
|
31
31
|
current_user.likes.find_by(post_id: @post.id).destroy!
|
32
32
|
|