updated contact#create to new attr checking

This commit is contained in:
Andres Keskküla 2014-08-11 14:21:02 +03:00
parent a3abfa73e5
commit e99af041f1
3 changed files with 39 additions and 0 deletions

View file

@ -67,6 +67,17 @@ module Epp::ContactsHelper
private
def validate_contact_create_request
@ph = params_hash['epp']['command']['create']['create']
xml_attrs_present?(@ph, [['id'],
['postalInfo'],
['postalInfo', 'name'],
['postalInfo', 'addr'],
['postalInfo', 'addr', 'city'],
['postalInfo', 'addr', 'cc'],
['authInfo']])
end
def contact_and_address_attributes
ph = params_hash['epp']['command'][params[:command]][params[:command]]
ph = ph[:chg] if params[:command] == 'update'