Domain creating refactor

This commit is contained in:
Martin Lensment 2014-08-11 16:41:31 +03:00
parent a01f03a6d5
commit b26345dde4
8 changed files with 103 additions and 86 deletions

View file

@ -35,11 +35,16 @@ module Epp::Common
def handle_errors(obj=nil)
if obj
obj.construct_epp_errors
@errors = obj.errors[:epp_errors]
@errors += obj.errors[:epp_errors]
end
render '/epp/error'
end
def append_errors(obj)
obj.construct_epp_errors
@errors += obj.errors[:epp_errors]
end
def xml_attrs_present?(ph, attributes)
attributes.each do |x|
epp_errors << {code: '2003', msg: I18n.t('errors.messages.required_parameter_missing', key: x.last)} unless has_attribute(ph, x)