Improvements on validation

This commit is contained in:
Martin Lensment 2014-09-22 19:30:22 +03:00
parent 8ea865f1b2
commit a4e5703233
6 changed files with 46 additions and 27 deletions

View file

@ -3,7 +3,7 @@ class DomainContact < ActiveRecord::Base
belongs_to :contact
belongs_to :domain
attr_accessor :typeahead_value
attr_accessor :value_typeahead
def epp_code_map
{
@ -31,7 +31,7 @@ class DomainContact < ActiveRecord::Base
contact_type == TECH
end
def typeahead_value
@typeahead_value || contact.try(:name) || nil
def value_typeahead
@value_typeahead || contact.try(:name) || nil
end
end