fixes #733
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
$("a#add-to-favorites").show();
|
||||
$("a#remove-from-favorites").hide();
|
||||
$("#score-for-post-<%= @post.id %>").html(<%= @post.score %>);
|
||||
|
||||
Reference in New Issue
Block a user