質問編集履歴

1

コード修正

2020/02/12 12:00

投稿

no1knows
no1knows

スコア3365

test CHANGED
File without changes
test CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  <% if post.liked_by?(current_user) %>
48
48
 
49
- <p><span>いいね解除: </span><%=link_to post.likes.count, post_likes_path(post.id), method: :delete, class: 'btn', remote: true %></p>
49
+ <p><span>いいね解除: </span><%=link_to post.likes.count, post_likes_path(post.id), method: :delete, class: 'btn goodbtn', remote: true %></p>
50
50
 
51
51
  <% else %>
52
52
 
@@ -70,7 +70,7 @@
70
70
 
71
71
  $('.btn').on('click', function() {
72
72
 
73
- var cnt = $(".btn").length;
73
+ var cnt = $(".goodbtn").length;
74
74
 
75
75
  alert(cnt);
76
76