Commenting to assimilate controllers

This commit is contained in:
Andres Keskküla 2014-08-15 12:21:07 +03:00
parent 0a4a7f98c2
commit 092460a604

View file

@ -67,8 +67,10 @@ module Epp::ContactsHelper
render 'epp/error' render 'epp/error'
end end
## HELPER METHODS
private private
## CREATE
def validate_contact_create_request def validate_contact_create_request
@ph = params_hash['epp']['command']['create']['create'] @ph = params_hash['epp']['command']['create']['create']
xml_attrs_present?(@ph, [['id'], xml_attrs_present?(@ph, [['id'],
@ -80,27 +82,31 @@ module Epp::ContactsHelper
['authInfo']]) ['authInfo']])
end end
## UPDATE
def validate_contact_update_request def validate_contact_update_request
@ph = params_hash['epp']['command']['update']['update'] @ph = params_hash['epp']['command']['update']['update']
xml_attrs_present?(@ph, [['id'] ]) xml_attrs_present?(@ph, [['id'] ])
end end
## DELETE
def validate_contact_delete_request def validate_contact_delete_request
@ph = params_hash['epp']['command']['delete']['delete'] @ph = params_hash['epp']['command']['delete']['delete']
xml_attrs_present?(@ph, [ ['id'] ] ) xml_attrs_present?(@ph, [ ['id'] ] )
end end
## CHECK
def validate_contact_check_request def validate_contact_check_request
@ph = params_hash['epp']['command']['check']['check'] @ph = params_hash['epp']['command']['check']['check']
xml_attrs_present?(@ph, [ ['id'] ]) xml_attrs_present?(@ph, [ ['id'] ])
end end
## INFO
def validate_contact_info_request def validate_contact_info_request
@ph = params_hash['epp']['command']['info']['info'] @ph = params_hash['epp']['command']['info']['info']
xml_attrs_present?(@ph, [ ['id'] ]) xml_attrs_present?(@ph, [ ['id'] ])
end end
## SHARED
def contact_and_address_attributes( type=:create ) def contact_and_address_attributes( type=:create )
case type case type
when :update when :update