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 -- Posted via http://www.ruby-forum.com/.
See http://api.rubyonrails.org/classes/ActionController/Routing.html - in particular, the section on route globbing. --Matt Jones On Oct 5, 10:05 am, Muruga Raj <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> 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 ishttp://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 > -- > Posted viahttp://www.ruby-forum.com/.
Matt Jones wrote:> See http://api.rubyonrails.org/classes/ActionController/Routing.html - > in particular, the section on route globbing. > > --Matt Jones > > On Oct 5, 10:05�am, Muruga Raj <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>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 -- Posted via http://www.ruby-forum.com/.