mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
parent
6f907e11b5
commit
b4b715f405
7 changed files with 61 additions and 11 deletions
|
@ -23,10 +23,10 @@ class Admin::RegistrarsController < AdminController
|
|||
@registrar.accounts.create!(account_type: Account::CASH, currency: 'EUR')
|
||||
end
|
||||
|
||||
flash[:notice] = I18n.t('registrar_added')
|
||||
flash[:notice] = t('.created')
|
||||
redirect_to [:admin, @registrar]
|
||||
rescue ActiveRecord::RecordInvalid
|
||||
flash.now[:alert] = I18n.t('failed_to_add_registrar')
|
||||
flash.now[:alert] = t('.not_created')
|
||||
render 'new'
|
||||
end
|
||||
end
|
||||
|
@ -35,10 +35,10 @@ class Admin::RegistrarsController < AdminController
|
|||
|
||||
def update
|
||||
if @registrar.update(registrar_params)
|
||||
flash[:notice] = I18n.t('registrar_updated')
|
||||
flash[:notice] = t('.updated')
|
||||
redirect_to [:admin, @registrar]
|
||||
else
|
||||
flash.now[:alert] = I18n.t('failed_to_update_registrar')
|
||||
flash.now[:alert] = t('.not_updated')
|
||||
render 'edit'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue