mirror of
https://github.com/internetee/registry.git
synced 2025-05-29 17:10:08 +02:00
118822101-builder_changes_for_array_error
(cherry picked from commit e7841b5
)
This commit is contained in:
parent
0e4a03517f
commit
436846cfe9
2 changed files with 8 additions and 2 deletions
|
@ -24,7 +24,7 @@ class Nameserver < ActiveRecord::Base
|
|||
def epp_code_map
|
||||
{
|
||||
'2302' => [
|
||||
[:hostname, :taken, { value: { obj: 'hostAttr', val: hostname } }]
|
||||
[:hostname, :taken, { value: { obj: 'hostAttr', val: {'hostName': hostname} } }]
|
||||
],
|
||||
'2005' => [
|
||||
[:hostname, :invalid, { value: { obj: 'hostAttr', val: hostname } }],
|
||||
|
|
|
@ -12,8 +12,14 @@ xml.epp_head do
|
|||
|
||||
if (val = value).respond_to?(:each)
|
||||
val.each do |el|
|
||||
if el.kind_of?(Array)
|
||||
xml.tag!("#{model_name}:#{x[:value][:obj]}") do
|
||||
xml.tag!("#{model_name}:#{el[0]}", el[1], attrs)
|
||||
end
|
||||
else
|
||||
xml.tag!("#{model_name}:#{x[:value][:obj]}", el, attrs)
|
||||
end
|
||||
end
|
||||
else
|
||||
xml.tag!("#{model_name}:#{x[:value][:obj]}", val, attrs)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue