Class: ErrorsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
lib/tasks/controllers/errors_controller.rb

Instance Method Summary collapse

Instance Method Details

#resque404(exception = nil) ⇒ Object



8
9
10
11
12
13
# File 'lib/tasks/controllers/errors_controller.rb', line 8

def resque404(exception = nil)
  if exception
    logger.info "Rendering 404 with exception: #{exception.message}"
  end
  render template: "notee/errors/not_found", status: 404
end

#resque500(exception = nil) ⇒ Object



15
16
17
18
19
20
# File 'lib/tasks/controllers/errors_controller.rb', line 15

def resque500(exception = nil)
  if exception
    logger.info "Rendering 500 with exception: #{exception.message}"
  end
  render template: "notee/errors/internal_server_error", status: 500
end

#showObject



22
# File 'lib/tasks/controllers/errors_controller.rb', line 22

def show; raise env["action_dispatch.exception"]; end