domain_block.rb 196 B

123456789
  1. # frozen_string_literal: true
  2. class DomainBlock < ApplicationRecord
  3. validates :domain, presence: true, uniqueness: true
  4. def self.blocked?(domain)
  5. where(domain: domain).exists?
  6. end
  7. end