Removed redundant begin clause

This commit is contained in:
Andres Keskküla 2014-08-07 17:24:57 +03:00
parent a0d5823979
commit 862b784761

View file

@ -23,17 +23,15 @@ module Epp::ContactsHelper
def delete_contact def delete_contact
ph = params_hash['epp']['command']['delete']['delete'] ph = params_hash['epp']['command']['delete']['delete']
begin @contact = Contact.where(code: ph[:id]).first
@contact = Contact.where(code: ph[:id]).first @contact.destroy
@contact.destroy render '/epp/contacts/delete'
render '/epp/contacts/delete' rescue NoMethodError => e
rescue NoMethodError => e epp_errors << { code: '2303', msg: t('errors.messages.epp_obj_does_not_exist') }
epp_errors << { code: '2303', msg: t('errors.messages.epp_obj_does_not_exist') } render '/epp/error'
render '/epp/error' rescue
rescue epp_errors << {code: '2400', msg: t('errors.messages.epp_command_failed')}
epp_errors << {code: '2400', msg: t('errors.messages.epp_command_failed')} render '/epp/error'
render '/epp/error'
end
end end
def check_contact def check_contact