Use expect
for admin/
controllers (#33686)
This commit is contained in:
parent
59384282ed
commit
65d9171c7d
57 changed files with 551 additions and 41 deletions
|
@ -25,7 +25,9 @@ module Admin
|
|||
rescue Mastodon::NotPermittedError
|
||||
flash[:alert] = I18n.t('admin.domain_blocks.not_permitted')
|
||||
else
|
||||
redirect_to admin_instances_path(limited: '1'), notice: I18n.t('admin.domain_blocks.created_msg')
|
||||
flash[:notice] = I18n.t('admin.domain_blocks.created_msg')
|
||||
ensure
|
||||
redirect_to admin_instances_path(limited: '1')
|
||||
end
|
||||
|
||||
def new
|
||||
|
@ -114,7 +116,12 @@ module Admin
|
|||
end
|
||||
|
||||
def form_domain_block_batch_params
|
||||
params.require(:form_domain_block_batch).permit(domain_blocks_attributes: [:enabled, :domain, :severity, :reject_media, :reject_reports, :private_comment, :public_comment, :obfuscate])
|
||||
params
|
||||
.expect(
|
||||
form_domain_block_batch: [
|
||||
domain_blocks_attributes: [[:enabled, :domain, :severity, :reject_media, :reject_reports, :private_comment, :public_comment, :obfuscate]],
|
||||
]
|
||||
)
|
||||
end
|
||||
|
||||
def action_from_button
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue