Add EmailDomainBlock.parents
scope (#31968)
This commit is contained in:
parent
6ae1fcd059
commit
697947116e
3 changed files with 6 additions and 4 deletions
|
@ -28,6 +28,8 @@ class EmailDomainBlock < ApplicationRecord
|
|||
|
||||
validates :domain, presence: true, uniqueness: true, domain: true
|
||||
|
||||
scope :parents, -> { where(parent_id: nil) }
|
||||
|
||||
# Used for adding multiple blocks at once
|
||||
attr_accessor :other_domains
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue