mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Fail Loudly
This commit is contained in:
parent
e5eaac291e
commit
61f6a3705f
1 changed files with 2 additions and 7 deletions
|
@ -46,13 +46,8 @@ module Admin
|
|||
end
|
||||
|
||||
def destroy
|
||||
if @api_user.destroy
|
||||
flash[:notice] = I18n.t('record_deleted')
|
||||
redirect_to admin_registrar_path(@api_user.registrar)
|
||||
else
|
||||
flash.now[:alert] = I18n.t('failed_to_delete_record')
|
||||
render 'show'
|
||||
end
|
||||
@api_user.destroy!
|
||||
redirect_to admin_registrar_path(@api_user.registrar), notice: t('record_deleted')
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue