Class: Megatron::ErrorsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Megatron::ErrorsController
- Includes:
- Gaffe::Errors
- Defined in:
- app/controllers/megatron/errors_controller.rb
Instance Method Summary collapse
-
#show ⇒ Object
Render the correct template based on the exception “standard” code.
Instance Method Details
#show ⇒ Object
Render the correct template based on the exception “standard” code. Eg. For a 404 error, the ‘errors/not_found` template will be rendered.
13 14 15 16 |
# File 'app/controllers/megatron/errors_controller.rb', line 13 def show # Here, the `@exception` variable contains the original raised error render "megatron/errors/#{@rescue_response}", status: @status_code end |