Merge branch 'master' of github.com:internetee/registry

This commit is contained in:
Martin Lensment 2014-08-05 17:19:31 +03:00
commit 38f0528d70
6 changed files with 25 additions and 35 deletions

View file

@ -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