ignores in moderation the admin restored proposals

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

View File

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

View File

@@ -28,6 +28,7 @@ feature 'Admin proposals' do
expect(page).to_not have_content(proposal.title) expect(page).to_not have_content(proposal.title)
expect(proposal.reload).to_not be_hidden expect(proposal.reload).to_not be_hidden
expect(proposal).to be_ignored_flag
end end
scenario 'Confirm hide' do scenario 'Confirm hide' do