mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +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
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
if @api_user.destroy
|
@api_user.destroy!
|
||||||
flash[:notice] = I18n.t('record_deleted')
|
redirect_to admin_registrar_path(@api_user.registrar), notice: t('record_deleted')
|
||||||
redirect_to admin_registrar_path(@api_user.registrar)
|
|
||||||
else
|
|
||||||
flash.now[:alert] = I18n.t('failed_to_delete_record')
|
|
||||||
render 'show'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue