From 7be7282d89050ec6e9eb44fd93c0ec231d9b9997 Mon Sep 17 00:00:00 2001 From: dinsmol Date: Mon, 23 Aug 2021 22:39:13 +0300 Subject: [PATCH] minor fixes --- app/controllers/admin/accounts_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index fa22ecbf2..2f0545752 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -19,12 +19,12 @@ module Admin params[:account][:balance], params[:description], AccountActivity::UPDATE_CREDIT) - unless action.call + if action.call + redirect_to admin_accounts_path, notice: t('.updated') + else flash[:alert] = t('invalid_balance') render 'edit' end - - redirect_to admin_accounts_path, notice: t('.updated') if action.call end private