The code powering m.abunchtell.com https://m.abunchtell.com
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

16 satır
354 B

  1. # frozen_string_literal: true
  2. class BlockDomainService < BaseService
  3. def call(domain)
  4. DomainBlock.find_or_create_by!(domain: domain)
  5. Account.where(domain: domain).find_each do |account|
  6. if account.subscribed?
  7. account.subscription(api_subscription_url(account.id)).unsubscribe
  8. end
  9. account.destroy!
  10. end
  11. end
  12. end