Adding domain blocks

This commit is contained in:
Eugen Rochko 2016-10-09 14:48:43 +02:00
commit 22a8801dbc
13 changed files with 92 additions and 10 deletions

View file

@ -0,0 +1,7 @@
class DomainBlock < ApplicationRecord
validates :domain, presence: true, uniqueness: true
def self.blocked?(domain)
where(domain: domain).exists?
end
end