I want to know if an arbitrary path can be mapped to a route
recognized_request_for accomplishes what I want, but I can\'t get it to work in my controller.
For Rails 3 the call is
Rails.application.routes.recognize_path
Instead of
ActionController::Routing::Routes.recognize_path
Example:
def path_exists?(path) Rails.application.routes.recognize_path(path) true rescue ActionController::RoutingError false end