mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Domain form contacts partial refactor
This commit is contained in:
parent
bfe89c7a09
commit
89295f5642
6 changed files with 17 additions and 14 deletions
|
@ -3,6 +3,8 @@ class DomainContact < ActiveRecord::Base
|
|||
belongs_to :contact
|
||||
belongs_to :domain
|
||||
|
||||
attr_accessor :typeahead_value
|
||||
|
||||
def epp_code_map
|
||||
{
|
||||
'2302' => [
|
||||
|
@ -28,4 +30,8 @@ class DomainContact < ActiveRecord::Base
|
|||
def tech?
|
||||
contact_type == TECH
|
||||
end
|
||||
|
||||
def typeahead_value
|
||||
@typeahead_value || contact.try(:name) || nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue