Adding domain blocks
This commit is contained in:
7
app/models/domain_block.rb
Normal file
7
app/models/domain_block.rb
Normal file
@ -0,0 +1,7 @@
|
||||
class DomainBlock < ApplicationRecord
|
||||
validates :domain, presence: true, uniqueness: true
|
||||
|
||||
def self.blocked?(domain)
|
||||
where(domain: domain).exists?
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user