mirror of
https://github.com/internetee/registry.git
synced 2025-07-13 22:45:06 +02:00
Refactor #2660
This commit is contained in:
parent
9f2b4a4550
commit
1e9426ce7b
3 changed files with 106 additions and 100 deletions
|
@ -155,6 +155,10 @@ class Domain < ActiveRecord::Base
|
|||
self[:name_dirty] = value
|
||||
end
|
||||
|
||||
def roid
|
||||
"EIS-#{id}"
|
||||
end
|
||||
|
||||
def registrant_typeahead
|
||||
@registrant_typeahead || registrant.try(:name) || nil
|
||||
end
|
||||
|
|
|
@ -7,6 +7,7 @@ xml.epp_head do
|
|||
xml.resData do
|
||||
xml.tag!('domain:infData', 'xmlns:domain' => 'urn:ietf:params:xml:ns:domain-1.0') do
|
||||
xml.tag!('domain:name', @domain.name)
|
||||
xml.tag!('domain:roid', @domain.roid)
|
||||
@domain.domain_statuses.each do |ds|
|
||||
xml.tag!('domain:status', ds.description, 's' => ds.value) unless ds.description.blank?
|
||||
xml.tag!('domain:status', 's' => ds.value) if ds.description.blank?
|
||||
|
@ -38,17 +39,17 @@ xml.epp_head do
|
|||
|
||||
xml.tag!('domain:clID', @domain.registrar_name)
|
||||
|
||||
xml.tag!('domain:crID', @domain.creator.try(:registrar))
|
||||
xml.tag!('domain:crID', @domain.creator.try(:registrar)) if @domain.creator
|
||||
|
||||
xml.tag!('domain:crDate', @domain.created_at.try(:iso8601))
|
||||
|
||||
xml.tag!('domain:upDate', @domain.updated_at.try(:iso8601)) if @domain.updated_at != @domain.created_at
|
||||
|
||||
xml.tag!('domain:exDate', @domain.valid_to.try(:iso8601))
|
||||
|
||||
# TODO Make domain stampable
|
||||
#xml.tag!('domain:upID', @domain.updated_by)
|
||||
|
||||
xml.tag!('domain:upDate', @domain.updated_at.try(:iso8601)) if @domain.updated_at != @domain.created_at
|
||||
|
||||
# TODO Make domain transferrable
|
||||
#xml.tag!('domain:trDate', @domain.transferred_at) if @domain.transferred_at
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue