fix unlike

This commit is contained in:
MrZYX 2011-05-29 13:43:56 +02:00
parent 32d3219bf6
commit 0febee6fbb

View file

@ -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|