You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
metu.life/app/services/unblock_domain_service.rb

17 lines
388 B

# frozen_string_literal: true
class UnblockDomainService < BaseService
def call(domain_block, retroactive)
if retroactive
accounts = Account.where(domain: domain_block.domain).in_batches
if domain_block.silence?
accounts.update_all(silenced: false)
else
accounts.update_all(suspended: false)
end
end
domain_block.destroy
end
end