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
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
recognize_path('/my_controller/my_action/my_id')
-- gw (www.railsdev.ws)
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:
ActionController::Routing::RouteSet.recognize_path(‘/my_controller/my_action/my_id’)
NoMethodError: undefined method `recognize_path’ for ActionController::Routing::RouteSet:Class
I am running Rails 1.2.5 if that matters.
Thanks! Tom
Hi --