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

I like the namespace, since it encapsulates the shop nicely inside my

Somehow I would like the url “” to map to the
shop’s “frontpage”, which in my case is Categories#index

But I don’t know how to do it. ‘/shop’, shop_categories_path
doesn’t work ‘/shop’, :controller => ‘categories’, :action => ‘index’
misses the namespace

So what should I do?

  • Carsten

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs