This commit is contained in:
Martin Lensment 2014-08-04 16:00:33 +03:00
parent 5bb212ba24
commit 3dca771bcb
4 changed files with 5 additions and 4 deletions

View file

@ -45,7 +45,7 @@ module Epp::Common
code: code,
msg: err[:msg],
value: {obj: err[:obj], val: err[:val]},
} and break if values.any? {|x| I18n.t("errors.messages.#{x}") == err[:msg] }
} and break if values.any? {|x| obj.errors.generate_message(key, x) == err[:msg]}
else
epp_errors << {
code: code,

View file

@ -60,7 +60,7 @@ module Epp::DomainsHelper
super({
'2302' => [:epp_domain_taken, :epp_domain_reserved],
'2306' => [:blank, [:out_of_range, {min: 1, max: 13}]],
'2303' => [:epp_contact_not_found]
'2303' => [:not_found]
}, @domain
)
end

View file

@ -38,7 +38,7 @@ class Domain < ActiveRecord::Base
errors.add(:domain_contacts, {
obj: 'contact',
val: x[:contact],
msg: I18n.t('errors.messages.epp_contact_not_found')
msg: errors.generate_message(:domain_contacts, :not_found)
})
end
end