Adding domain blocks
This commit is contained in:
parent
52d7f862d3
commit
22a8801dbc
13 changed files with 92 additions and 10 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue