use @like.target instead of @target, build should be green
This commit is contained in:
parent
20b4304f23
commit
d084c708b6
2 changed files with 3 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ class LikesController < ApplicationController
|
|||
end
|
||||
|
||||
def destroy
|
||||
if target && @like = Like.where(:id => params[:id], :author_id => current_user.person.id).first
|
||||
if @like = Like.where(:id => params[:id], :author_id => current_user.person.id).first
|
||||
current_user.retract(@like)
|
||||
respond_to do |format|
|
||||
format.all { }
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
$(".like_action", "#<%=@target.guid%>").first().html("<%= escape_javascript(like_action(@like.target))%>");
|
||||
ContentUpdater.addLikesToPost("<%=@like.target.guid%>", "<%= escape_javascript(render("likes/likes_container", :target_id => @like.target_id, :likes_count => @target.reload.likes_count, :target_type => @like.target_type)) %>");
|
||||
$(".like_action", "#<%=@like.target.guid%>").first().html("<%= escape_javascript(like_action(@like.target))%>");
|
||||
ContentUpdater.addLikesToPost("<%=@like.target.guid%>", "<%= escape_javascript(render("likes/likes_container", :target_id => @like.target_id, :likes_count => @like.target.reload.likes_count, :target_type => @like.target_type)) %>");
|
||||
Loading…
Reference in a new issue