Skip to main content

Timeline for LikesControler for a Post

Current License: CC BY-SA 3.0

2 events
when toggle format what by license comment
Aug 20, 2015 at 10:22 comment added Simon Forsberg According to a deleted answer I converted to a comment on the question: You forgot to add post_id on the where query. def already_liked_post?(post_id) Like.where(user_id: current_user.id, post_id: params[:post_id]).count > 0 end (I personally don't know if this is correct or not)
Aug 4, 2015 at 16:58 history answered Greg Burghardt CC BY-SA 3.0