mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Improve error messages
This commit is contained in:
parent
61f6a3705f
commit
aa8be7d148
3 changed files with 20 additions and 11 deletions
|
@ -16,8 +16,8 @@ module Admin
|
|||
|
||||
if @api_user.valid?
|
||||
@api_user.save!
|
||||
flash[:notice] = I18n.t('record_created')
|
||||
redirect_to admin_registrar_api_user_path(@api_user.registrar, @api_user)
|
||||
redirect_to admin_registrar_api_user_path(@api_user.registrar, @api_user),
|
||||
notice: t('.created')
|
||||
else
|
||||
render 'new'
|
||||
end
|
||||
|
@ -38,8 +38,8 @@ module Admin
|
|||
|
||||
if @api_user.valid?
|
||||
@api_user.save!
|
||||
flash[:notice] = I18n.t('record_updated')
|
||||
redirect_to admin_registrar_api_user_path(@api_user.registrar, @api_user)
|
||||
redirect_to admin_registrar_api_user_path(@api_user.registrar, @api_user),
|
||||
notice: t('.updated')
|
||||
else
|
||||
render 'edit'
|
||||
end
|
||||
|
@ -47,7 +47,7 @@ module Admin
|
|||
|
||||
def destroy
|
||||
@api_user.destroy!
|
||||
redirect_to admin_registrar_path(@api_user.registrar), notice: t('record_deleted')
|
||||
redirect_to admin_registrar_path(@api_user.registrar), notice: t('.deleted')
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue