mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
fixed error
This commit is contained in:
parent
b8cf5a9009
commit
f08e95642d
1 changed files with 8 additions and 8 deletions
|
@ -15,16 +15,16 @@ module Admin
|
||||||
def edit; end
|
def edit; end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
if @account.valid?
|
action = Actions::AccountActivityCreate.new(@account,
|
||||||
action = Actions::AccountActivityCreate.new(@account,
|
params[:account][:balance],
|
||||||
params[:account][:balance],
|
params[:description],
|
||||||
params[:description],
|
AccountActivity::UPDATE_CREDIT)
|
||||||
AccountActivity::UPDATE_CREDIT)
|
unless action.call
|
||||||
redirect_to admin_accounts_path, notice: t('.updated') && return if action.call
|
flash[:alert] = t('invalid_balance')
|
||||||
|
render 'edit'
|
||||||
end
|
end
|
||||||
|
|
||||||
flash[:alert] = t('invalid_balance')
|
redirect_to admin_accounts_path, notice: t('.updated') if action.call
|
||||||
render 'edit'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue