Skip to content
Snippets Groups Projects
Commit d084c708 authored by Dan Hansen's avatar Dan Hansen
Browse files

use @like.target instead of @target, build should be green

parent 20b4304f
No related branches found
No related tags found
No related merge requests found
......@@ -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 { }
......
$(".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)) %>");
\ No newline at end of file
$(".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)) %>");
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment