Class: Megatron::ErrorsController

Inherits:
ApplicationController
  • Object
show all
Includes:
Gaffe::Errors
Defined in:
app/controllers/megatron/errors_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject

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