class ErrMerchant::ExceptionsApp

Public Instance Methods

call(env) click to toggle source
# File lib/err_merchant/exceptions_app.rb, line 5
def call(env)
  status = env["PATH_INFO"][1..-1]
  ErrMerchant::ErrorsController.action(Rack::Utils::SYMBOL_TO_STATUS_CODE.invert[status.to_i]).call(env)
rescue
  ActionDispatch::PublicExceptions.new(Rails.root.join('public')).call(env)
end