From b8cf5a9009392de96981cf9280a37b4e6ff996a3 Mon Sep 17 00:00:00 2001 From: dinsmol Date: Mon, 23 Aug 2021 21:37:28 +0300 Subject: [PATCH] fixed codeclimate errors --- app/controllers/admin/accounts_controller.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index aa656d4f0..3ed592092 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -16,9 +16,11 @@ module Admin def update if @account.valid? - action = Actions::AccountActivityCreate.new(@account, params[:account][:balance], - params[:description], AccountActivity::UPDATE_CREDIT) - redirect_to admin_accounts_path, notice: t('.updated') and return if action.call + action = Actions::AccountActivityCreate.new(@account, + params[:account][:balance], + params[:description], + AccountActivity::UPDATE_CREDIT) + redirect_to admin_accounts_path, notice: t('.updated') && return if action.call end flash[:alert] = t('invalid_balance')