Pass the ID from link to likesdestroy

This commit is contained in:
Brenda Wallace
2017-02-12 15:34:28 +13:00
parent 72d0514e75
commit c82f47bdda

View File

@@ -46,7 +46,7 @@
- else
- like = post.likes.find_by(member: current_member)
- if like && can?(:destroy, like)
= link_to 'Unlike', like_path(like, format: :json),
= link_to 'Unlike', like_path(id: like.id, format: :json),
method: :delete, remote: true, class: 'post-like'