Class: Fedipub::Moderation::DomainBlock
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Fedipub::Moderation::DomainBlock
- Defined in:
- app/models/fedipub/moderation/domain_block.rb
Class Method Summary collapse
Class Method Details
.blocked?(query) ⇒ Boolean
5 6 7 8 9 10 |
# File 'app/models/fedipub/moderation/domain_block.rb', line 5 def self.blocked?(query) self.exists?(domain: [ query, PublicSuffix.parse(query).domain ]) rescue PublicSuffix::Error # Allow things that we don't understand false end |