Replaced address with local and international addr

This commit is contained in:
Andres Keskküla 2014-08-25 17:05:57 +03:00
parent fe54f327d9
commit 2655da4555
16 changed files with 208 additions and 57 deletions

View file

@ -57,6 +57,15 @@ module Epp::Common
epp_errors.empty?
end
def xml_nested_attrs_present?(array_ph, attributes )
[array_ph].flatten.each do |ph|
attributes.each do |x|
epp_errors << {code: '2003', msg: I18n.t('errors.messages.required_parameter_missing', key: x.last)} unless has_attribute(ph, x)
end
end
epp_errors.empty?
end
def has_attribute(ph, path)
path.inject(ph) do |location, key|
location.respond_to?(:keys) ? location[key] : nil