blob: 89c81f766a28a6b584aec6e00dc7a89be820295c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# frozen_string_literal: true
class DomainBlock < ApplicationRecord
enum severity: [:silence, :suspend]
attr_accessor :retroactive
validates :domain, presence: true, uniqueness: true
def self.blocked?(domain)
where(domain: domain, severity: :suspend).exists?
end
end
|