Add epp errors tto the concern itself

This commit is contained in:
Alex Sherman 2021-05-04 15:19:50 +05:00
parent d4775ba5c5
commit e15fed2cd0
5 changed files with 19 additions and 7 deletions

View file

@ -2,7 +2,7 @@ xml.epp_head do
xml.response do
@errors.each do |error|
x = error&.options
next if x.empty?
next if x.empty? || x == { value: nil }
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