refactoring

This commit is contained in:
Oleg Hasjanov 2021-06-04 17:23:38 +03:00
parent 9e8f760fc4
commit 2b575cdae1
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@ xml.epp_head do
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
prefix = model_name == 'poll' ? 'changePoll' : model_name + '-eis'
prefix = model_name == 'poll' ? 'changePoll' : model_name + '-ee'
xml.value("xmlns:#{model_name}" => Xsd::Schema.filename(for_prefix: prefix)) do
value = x[:value][:val]

View file

@ -4,7 +4,7 @@ module Xsd
BASE_URL = 'https://epp.tld.ee/schema/'.freeze
PREFIXES = %w[
domain-ee
domain-ee
domain-eis
all-ee
changePoll