murraj
October 5, 2009, 4:05pm
1
Hello all,
I need a suggestion in routes configuration.
My requirement is to get all the parameters after the username in a URL,
as a one string.
That is, consider my url is http://example.com/raj/123/456/789/101
Here ‘raj’ is the username and i want to extract all the words after
‘raj’ as one parameter. So “123/456/789/101” should be passed as a
single parameter.
Is it possible?
Please help in finding the solution.
If you have any suggestions please help me !!!
Thank You
murraj
October 6, 2009, 5:48pm
2
See http://api.rubyonrails.org/classes/ActionController/Routing.html -
in particular, the section on route globbing.
–Matt J.
On Oct 5, 10:05 am, Muruga R. [email protected]
murraj
October 7, 2009, 5:44am
3
Matt J. wrote:
See http://api.rubyonrails.org/classes/ActionController/Routing.html -
in particular, the section on route globbing.
–Matt J.
On Oct 5, 10:05�am, Muruga R. [email protected]
Thank you very much Jones.
That’s what i expected.
I added the following in my routes.rb and the problem is solved.
map.profile ‘:username/*levels’, :controller => ‘user’, :action =>
‘profile’.
Thank You