mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
Merge branch 'master' of github.com:internetee/registry
This commit is contained in:
commit
38f0528d70
6 changed files with 25 additions and 35 deletions
|
@ -2,13 +2,15 @@ class Contact < ActiveRecord::Base
|
|||
#TODO Foreign contact will get email with activation link/username/temp password
|
||||
#TODO Phone number validation, in first phase very minimam in order to support current registries
|
||||
|
||||
has_many :addresses
|
||||
has_one :address
|
||||
has_many :domain_contacts
|
||||
has_many :domains, through: :domain_contacts
|
||||
|
||||
belongs_to :created_by, class_name: 'EppUser', foreign_key: :created_by_id
|
||||
belongs_to :updated_by, class_name: 'EppUser', foreign_key: :updated_by_id
|
||||
|
||||
accepts_nested_attributes_for :address
|
||||
|
||||
validates_presence_of :code, :name, :phone, :email, :ident
|
||||
|
||||
validate :ident_must_be_valid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue