mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Story#118822101 - domains -> domain
This commit is contained in:
parent
58bdbb3f73
commit
8839110f10
1 changed files with 4 additions and 3 deletions
|
@ -3,18 +3,19 @@ xml.epp_head do
|
|||
@errors.each do |x|
|
||||
xml.result('code' => x[:code]) do
|
||||
xml.msg(x[:msg], 'lang' => 'en')
|
||||
model_name = resource ? resource.model_name.singular.sub('epp_','') : controller.controller_name.singularize
|
||||
|
||||
xml.value("xmlns:#{controller.controller_name}" => 'https://epp.tld.ee/schema/all-ee-1.0.xsd') do
|
||||
xml.value("xmlns:#{model_name}" => "https://epp.tld.ee/schema/#{model_name}-eis-1.0.xsd") do
|
||||
value = x[:value][:val]
|
||||
attrs = {}
|
||||
attrs["s"] = value if x[:value][:obj] == "status"
|
||||
|
||||
if (val = value).respond_to?(:each)
|
||||
val.each do |el|
|
||||
xml.tag!("#{controller.controller_name}:#{x[:value][:obj]}", el, attrs)
|
||||
xml.tag!("#{model_name}:#{x[:value][:obj]}", el, attrs)
|
||||
end
|
||||
else
|
||||
xml.tag!("#{controller.controller_name}:#{x[:value][:obj]}", val, attrs)
|
||||
xml.tag!("#{model_name}:#{x[:value][:obj]}", val, attrs)
|
||||
end
|
||||
end if x[:value]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue