This is a dumb question but for some reason I can not get this to work. I basically just need a route that is prefixed with /components. So I did this: map.components "/components/:controller/:action" The problem is what if I have nested controllers? For example: components/foo/bar/some_action It things bar is my action and doesn''t recognize my route correctly. Is what I''m trying to do possible with routes? thanks for your help -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ben Johnson wrote:> This is a dumb question but for some reason I can not get this to work. > I basically just need a route that is prefixed with /components. So I > did this: > > map.components "/components/:controller/:action" > > The problem is what if I have nested controllers? For example: > > components/foo/bar/some_action > > It things bar is my action and doesn''t recognize my route correctly. > > Is what I''m trying to do possible with routes? > > thanks for your helpJust add another route: map.connect ''/components/foo/:controller/:action'' -- Michael Wang --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---