Class: Outpost::ErrorsController

Inherits:
BaseController show all
Defined in:
app/controllers/outpost/errors_controller.rb

Constant Summary

Constants included from Controller::CustomErrors

Controller::CustomErrors::NOT_FOUND_ERROR_CLASSES

Instance Method Summary collapse

Methods included from Controller::Authentication

#current_user, #require_login

Methods included from Controller::Authorization

#authorize, #authorize_resource, #handle_unauthorized

Methods included from Breadcrumbs

#breadcrumb

Instance Method Details

#not_foundObject



2
3
4
5
# File 'app/controllers/outpost/errors_controller.rb', line 2

def not_found
  render_error(404, ActionController::RoutingError.new("Not Found"))
  return
end

#trigger_errorObject

Raises:

  • (StandardError)


7
8
9
# File 'app/controllers/outpost/errors_controller.rb', line 7

def trigger_error
  raise StandardError, "This is a test error. It works (or does it?)"
end