From 5247ea4efd3683154d52efe4385bdbb63f476943 Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 8 Apr 2019 18:35:41 +0200 Subject: Fix batch actions not working on pending accounts (#10508) --- app/controllers/admin/pending_accounts_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/admin/pending_accounts_controller.rb') diff --git a/app/controllers/admin/pending_accounts_controller.rb b/app/controllers/admin/pending_accounts_controller.rb index 8429d3585..f145108b3 100644 --- a/app/controllers/admin/pending_accounts_controller.rb +++ b/app/controllers/admin/pending_accounts_controller.rb @@ -8,11 +8,11 @@ module Admin @form = Form::AccountBatch.new end - def update + def batch @form = Form::AccountBatch.new(form_account_batch_params.merge(current_account: current_account, action: action_from_button)) @form.save rescue ActionController::ParameterMissing - # Do nothing + flash[:alert] = I18n.t('admin.accounts.no_account_selected') ensure redirect_to admin_pending_accounts_path(current_params) end -- cgit