Class: ErrorsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
lib/generators/adminpanel/custom_errors/templates/errors_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



6
7
8
9
10
11
12
13
# File 'lib/generators/adminpanel/custom_errors/templates/errors_controller.rb', line 6

def show
  @exception  = env['action_dispatch.exception']
  @status     = ActionDispatch::ExceptionWrapper.new(env, @exception).status_code

  # @response   = ActionDispatch::ExceptionWrapper.rescue_responses[@exception.class.name]
  # response contains the error name ex: 404 => "not found"
  render status: @status
end