Route Information

Is there a method to return a hash of the route configuration based on a path?

For example:

magic_method('/my_controller/my_action/my_id') => {:controller => 'my_controller', :action => 'my_action', :id => 'my_id'}

Thanks! Tom


-- gw (

Excellent! That is exactly what I am looking for except I can’t seem to figure out how to call the method. From an IRB console:


NoMethodError: undefined method `recognize_path’ for ActionController::Routing::RouteSet:Class

I am running Rails 1.2.5 if that matters.

Thanks! Tom

Hi --