Class: RoutingErrorController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/routing_error_controller.rb

Instance Method Summary collapse

Instance Method Details

#rescueObject

Re-raise routing_error that has been catched in rack app. To rescue this error, use default actions:

rescue_from ActionController::RoutingError, :with => :rescue_404
def rescue_404
  # do something
end

Raises:

  • (ActionController::RoutingError)


11
12
13
14
# File 'app/controllers/routing_error_controller.rb', line 11

def rescue
  env['REQUEST_URI'] = env['vidibus-routing_error.request_uri']
  raise ActionController::RoutingError, "No route matches #{env['REQUEST_URI'].inspect}"
end