mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-06 01:41:08 +00:00
Combine assignment params in admin/accounts#batch
action (#35463)
This commit is contained in:
parent
b19131202f
commit
d065ec9298
|
@ -16,11 +16,14 @@ module Admin
|
||||||
def batch
|
def batch
|
||||||
authorize :account, :index?
|
authorize :account, :index?
|
||||||
|
|
||||||
@form = Form::AccountBatch.new(form_account_batch_params)
|
@form = Form::AccountBatch.new(
|
||||||
@form.current_account = current_account
|
form_account_batch_params.merge(
|
||||||
@form.action = action_from_button
|
action: action_from_button,
|
||||||
@form.select_all_matching = params[:select_all_matching]
|
current_account:,
|
||||||
@form.query = filtered_accounts
|
query: filtered_accounts,
|
||||||
|
select_all_matching: params[:select_all_matching]
|
||||||
|
)
|
||||||
|
)
|
||||||
@form.save
|
@form.save
|
||||||
rescue ActionController::ParameterMissing
|
rescue ActionController::ParameterMissing
|
||||||
flash[:alert] = I18n.t('admin.accounts.no_account_selected')
|
flash[:alert] = I18n.t('admin.accounts.no_account_selected')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user