I am looking for method for parsing route path like this:
ActionController::Routing.new(\"post_path\").parse #=> {:controller => \"posts\", :action =&g
In Rails 3 you can do the following:
Rails.application.routes.recognize_path "/accounts/1" # {:action=>"show", :controller=>"accounts", :id=>"1"}
Using ActionController::Routing::Routes.recognize_path kept throwing
ActionController::Routing::Routes.recognize_path
ActionController::RoutingError Exception: No route matches "/accounts/1