This commit is contained in:
albert
2013-03-03 15:37:20 -05:00
parent 2c270e09e2
commit caacd3f86f
2 changed files with 3 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ class FavoritesController < ApplicationController
end
def destroy
Post.find(params[:id]).remove_favorite!(CurrentUser.user)
@post = Post.find(params[:id])
@post.remove_favorite!(CurrentUser.user)
end
end

View File

@@ -1,2 +1,3 @@
$("a#add-to-favorites").show();
$("a#remove-from-favorites").hide();
$("#score-for-post-<%= @post.id %>").html(<%= @post.score %>);