Extract method to redirect keeping query params

This commit is contained in:
Javi Martín
2019-11-10 13:21:15 +01:00
parent 941fc76884
commit 667797161b
10 changed files with 20 additions and 16 deletions

View File

@@ -12,14 +12,14 @@ class Admin::ProposalNotificationsController < Admin::BaseController
def confirm_hide
@proposal_notification.confirm_hide
redirect_to request.query_parameters.merge(action: :index)
redirect_with_query_params_to(action: :index)
end
def restore
@proposal_notification.restore
@proposal_notification.ignore_flag
Activity.log(current_user, :restore, @proposal_notification)
redirect_to request.query_parameters.merge(action: :index)
redirect_with_query_params_to(action: :index)
end
private