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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to