Add actions to set force delete #2624

This commit is contained in:
Martin Lensment 2015-06-10 19:15:40 +03:00
parent 9bd832278c
commit ba5be7b4f4
9 changed files with 101 additions and 24 deletions

View file

@ -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