mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Add ability to delete records #2806
This commit is contained in:
parent
44b2d383b1
commit
72b322ae1f
4 changed files with 21 additions and 0 deletions
|
@ -35,6 +35,16 @@ class Admin::ZonefileSettingsController < AdminController
|
|||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
if @zonefile_setting.destroy
|
||||
flash[:notice] = I18n.t('record_deleted')
|
||||
redirect_to admin_zonefile_settings_path
|
||||
else
|
||||
flash.now[:alert] = I18n.t('failed_to_delete_record')
|
||||
render 'edit'
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_zonefile_setting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue