mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Use errors as first-class objects
This commit is contained in:
parent
72c865e656
commit
d4775ba5c5
8 changed files with 146 additions and 186 deletions
|
@ -1,6 +1,8 @@
|
|||
xml.epp_head do
|
||||
xml.response do
|
||||
@errors.each do |x|
|
||||
@errors.each do |error|
|
||||
x = error&.options
|
||||
next if x.empty?
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue