0
0
Fork 0

Refactor domain_blocks_controller (#2843)

* Set domain_block by before_action

* Cast value with ActiveRecord::Type

* Batch update
This commit is contained in:
alpaca-tc 2017-05-07 00:03:34 +09:00 committed by Eugen Rochko
parent 2d45794956
commit a0b1951791
3 changed files with 13 additions and 8 deletions

View file

@ -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