Refactor domain_blocks_controller (#2843)
* Set domain_block by before_action * Cast value with ActiveRecord::Type * Batch update
This commit is contained in:
parent
2d45794956
commit
a0b1951791
3 changed files with 13 additions and 8 deletions
|
@ -19,7 +19,7 @@ class BlockDomainService < BaseService
|
|||
end
|
||||
|
||||
def silence_accounts!
|
||||
blocked_domain_accounts.update_all(silenced: true)
|
||||
blocked_domain_accounts.in_batches.update_all(silenced: true)
|
||||
clear_media! if domain_block.reject_media?
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue