Merge branch 'master' of github.com:domify/registry

This commit is contained in:
Priit Tark 2015-07-21 17:37:21 +03:00
commit 78d7f45516
4 changed files with 72 additions and 68 deletions

View file

@ -130,10 +130,14 @@ class Epp::DomainsController < EppController
@domain_transfer = @domain.transfer(params[:parsed_frame], action, current_user)
if @domain.errors.empty? && @domain_transfer
if @domain_transfer
render_epp_response '/epp/domains/transfer'
else
handle_errors(@domain)
epp_errors << {
code: '2303',
msg: I18n.t('no_transfers_found')
}
handle_errors
end
end

View file

@ -8,6 +8,18 @@ class EppController < ApplicationController
before_action :latin_only
before_action :validate_request
before_action :update_epp_session
around_action :catch_epp_errors
def catch_epp_errors
err = catch(:epp_error) do
yield
nil
end
return unless err
@errors = [err]
handle_errors
end
helper_method :current_user
rescue_from StandardError do |e|