回答編集履歴

1

修正

2020/12/09 22:09

投稿

neko_daisuki
neko_daisuki

スコア2090

test CHANGED
@@ -44,7 +44,7 @@
44
44
 
45
45
  ```
46
46
 
47
- $("#like-button-#{@post.id}").html("<%= j(render partial: 'like', locals: { posts: @posts, likes: @likes, like: @like, post: @post}) %>")
47
+ $("#like-button-<%= @post.id %>").html("<%= j(render partial: 'like', locals: { posts: @posts, likes: @likes, like: @like, post: @post}) %>")
48
48
 
49
49
 
50
50
 
@@ -56,6 +56,6 @@
56
56
 
57
57
  ```
58
58
 
59
- $("#like-button-#{@post.id}").html("<%= j(render partial: 'like', locals: { posts: @posts, likes: @likes, like: @like, post: @post}) %>")
59
+ $("#like-button-<%= @post.id %>").html("<%= j(render partial: 'like', locals: { posts: @posts, likes: @likes, like: @like, post: @post}) %>")
60
60
 
61
61
  ```