ignores in moderation the admin restored comments

This commit is contained in:
Juanjo Bazán
2015-09-25 13:24:34 +02:00
parent 13fc4e5a3d
commit 0dc9224ce6
2 changed files with 2 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ class Admin::CommentsController < Admin::BaseController
def restore def restore
@comment.restore @comment.restore
@comment.ignore_flag
Activity.log(current_user, :restore, @comment) Activity.log(current_user, :restore, @comment)
redirect_to request.query_parameters.merge(action: :index) redirect_to request.query_parameters.merge(action: :index)
end end

View File

@@ -35,6 +35,7 @@ feature 'Admin comments' do
expect(page).to_not have_content(comment.body) expect(page).to_not have_content(comment.body)
expect(comment.reload).to_not be_hidden expect(comment.reload).to_not be_hidden
expect(comment).to be_ignored_flag
end end
scenario "Confirm hide" do scenario "Confirm hide" do