Carsten Gehling
2010-Jan-20 20:30 UTC
How to map a Named Route onto a namespaced resource?
I have a site, where I am currently adding a self-built shop. Among other stuff I have this construction in my route-file map.namespace :shop do |shop| shop.resources :categories do |categories| categories.resources :products end end I like the namespace, since it encapsulates the shop nicely inside my webapplication. Somehow I would like the url "http://mysite.com/shop" to map to the shop''s "frontpage", which in my case is Categories#index But I don''t know how to do it. map.shop ''/shop'', shop_categories_path doesn''t work map.shop ''/shop'', :controller => ''categories'', :action => ''index'' misses the namespace So what should I do? - Carsten -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.