fix unlike
This commit is contained in:
parent
32d3219bf6
commit
0febee6fbb
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ class LikesController < ApplicationController
|
|||
end
|
||||
|
||||
def destroy
|
||||
if @like = Like.where(:id => params[:id], :author_id => current_user.person.id).first
|
||||
if @like = Like.where(:post_id => params[:post_id], :author_id => current_user.person.id).first
|
||||
current_user.retract(@like)
|
||||
else
|
||||
respond_to do |format|
|
||||
|
|
|
|||
Loading…
Reference in a new issue