Add some more tests and clean up domain block controller (#27469)
This commit is contained in:
parent
e5b7ae9576
commit
d649bbf28f
2 changed files with 15 additions and 5 deletions
|
@ -33,7 +33,7 @@ module Admin
|
|||
|
||||
# Disallow accidentally downgrading a domain block
|
||||
if existing_domain_block.present? && !@domain_block.stricter_than?(existing_domain_block)
|
||||
@domain_block.save
|
||||
@domain_block.validate
|
||||
flash.now[:alert] = I18n.t('admin.domain_blocks.existing_domain_block_html', name: existing_domain_block.domain, unblock_url: admin_domain_block_path(existing_domain_block)).html_safe
|
||||
@domain_block.errors.delete(:domain)
|
||||
return render :new
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue