diff options
Diffstat (limited to 'app/controllers/admin/domain_blocks_controller.rb')
-rw-r--r-- | app/controllers/admin/domain_blocks_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/admin/domain_blocks_controller.rb b/app/controllers/admin/domain_blocks_controller.rb index d40ec829b..72bf1cd0d 100644 --- a/app/controllers/admin/domain_blocks_controller.rb +++ b/app/controllers/admin/domain_blocks_controller.rb @@ -27,7 +27,7 @@ module Admin def destroy @domain_block = DomainBlock.find(params[:id]) - UnblockDomainService.new.call(@domain_block, resource_params[:retroactive]) + UnblockDomainService.new.call(@domain_block, retroactive_unblock?) redirect_to admin_domain_blocks_path, notice: I18n.t('admin.domain_blocks.destroyed_msg') end @@ -36,5 +36,9 @@ module Admin def resource_params params.require(:domain_block).permit(:domain, :severity, :reject_media, :retroactive) end + + def retroactive_unblock? + resource_params[:retroactive] == '1' + end end end |