mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Validate uniqueness manually all the time
This commit is contained in:
parent
0ab1e29a53
commit
3f8f5cc4cd
5 changed files with 17 additions and 14 deletions
|
@ -18,7 +18,6 @@ class DomainContact < ActiveRecord::Base
|
|||
TYPES = [TECH, ADMIN]
|
||||
|
||||
validates :contact, presence: true
|
||||
validates :contact, uniqueness: { scope: [:domain_id, :contact_type] }
|
||||
|
||||
scope :admin, -> { where(contact_type: ADMIN) }
|
||||
scope :tech, -> { where(contact_type: TECH) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue