Removed strings from contact epp code map

This commit is contained in:
Andres Keskküla 2014-08-22 12:41:19 +03:00
parent 60451a3f6f
commit 58d4ecc4fd
2 changed files with 16 additions and 6 deletions

View file

@ -88,7 +88,8 @@ class Contact < ActiveRecord::Base
clean_up_address
if has_relation(:domain_contacts) || domains_owned.present?
errors.add(:contact, msg: I18n.t('errors.messages.epp_obj_association_error'), value: { obj: 'contact', val: code })
#errors.add(:contact, msg: I18n.t('errors.messages.epp_obj_association_error'), value: { obj: 'contact', val: code })
errors.add(:domains, :exist)
return false
end
destroy
@ -96,10 +97,18 @@ class Contact < ActiveRecord::Base
def epp_code_map
{
'2302' => [[:code, :epp_id_taken]],
'2303' => [:not_found, :epp_obj_does_not_exist],
'2305' => ['Object association prohibits operation' ],
'2005' => ['Phone nr is invalid', 'Email is invalid']
'2302' => [ #Object exists
[:code, :epp_id_taken]
],
'2303' => #Object does not exist
[:not_found, :epp_obj_does_not_exist],
'2305' => [ #Association exists
[:domains, :exist]
],
'2005' => [ #Value syntax error
[:phone, :invalid],
[:email, :invalid]
]
}
end

View file

@ -37,6 +37,8 @@ en:
invalid: "Email is invalid"
ident:
blank: "Required parameter missing - ident"
domains:
exist: 'Object association prohibits operation'
domain:
attributes:
name_dirty:
@ -91,7 +93,6 @@ en:
epp_exp_dates_do_not_match: 'Given and current expire dates do not match'
epp_registrant_not_found: 'Registrant not found'
required_parameter_missing: 'Required parameter missing: %{key}'
epp_obj_association_error: 'Object association prohibits operation'
setting_groups:
codes: