[Rails] routes question [Catching URL in a variable]
softwareengineer 99
softwareengineer99 at yahoo.com
Tue Feb 14 09:14:18 GMT 2006
Hello Rails Gurus,
I have spent the entire night trying to figure this out with no luck. I will really appreciate if someone can come to my rescue.
I have a URL like the following:
http://domain.com/resource/http://www.rubyonrails.org
and would like to capture the rubyonrails URL after the http://domain.com/resource/ part in a variable.
I tried something like
map.connect 'resource/:protocol//:link' ....
but since I cannot accurately predict the number of forward slashes involved, I cannot hard code the route.
Is there any way I can tell in routes.rb to capture everything after "resource/" part and store it in a variable?
I highly appreciate your assistance.
Frank
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060214/f5a46f62/attachment.html
More information about the Rails
mailing list