How to add a root in to a namespace in routes.rb?

how to add a root in to a namespace in routes.rb ?

we can add root in routes.rb like
map.root :products

suppose if it is a namespace then how to add root to it?

map.namespace(:admin) do |admin|
admin.root :products # this is not working
admin.resources :products
end

any idea?

by
(S&G-typeH)
#—Yes t|-|eRe is No LoGiC iN t|-|e Life—#

On 19 Sep 2008, at 15:20, Pokkai D. wrote:

map.namespace(:admin) do |admin|
admin.root :products # this is not working

admin.root :controller => “products”, :action => “index”

Peter De Berdt wrote:

On 19 Sep 2008, at 15:20, Pokkai D. wrote:
admin.root :controller => “products”, :action => “index”

thanks