Forum: Ruby on Rails opposite of url_for()?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Peter M. (Guest)
on 2006-06-10 23:37
(Received via mailing list)
Hi,

I have a string in a controller that represents a url for my website.
For example the string might be

/cont/act/id

and I want to break this up using the routes defined in my
config/routes.rb file so that I get a hash like

{:controller => 'cont', :act => 'act', :id=>'id'}

How can I access all of the information stored in config/routes.rb so
I can deconstruct a url string? I think I want the opposite of
url_for()

Thanks,
Peter
This topic is locked and can not be replied to.