mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Add actions to set force delete #2624
This commit is contained in:
parent
9bd832278c
commit
ba5be7b4f4
9 changed files with 101 additions and 24 deletions
|
@ -28,6 +28,24 @@ class Admin::DomainsController < AdminController
|
|||
end
|
||||
end
|
||||
|
||||
def set_force_delete
|
||||
if @domain.set_force_delete
|
||||
flash[:notice] = I18n.t('domain_updated')
|
||||
else
|
||||
flash.now[:alert] = I18n.t('failed_to_update_domain')
|
||||
end
|
||||
redirect_to [:admin, @domain]
|
||||
end
|
||||
|
||||
def unset_force_delete
|
||||
if @domain.unset_force_delete
|
||||
flash[:notice] = I18n.t('domain_updated')
|
||||
else
|
||||
flash.now[:alert] = I18n.t('failed_to_update_domain')
|
||||
end
|
||||
redirect_to [:admin, @domain]
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_domain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue