Stefan Buhr wrote in post #897683: > Conrad Taylor wrote: >> Sent from my iPhone >> >> >> Please post the Rails 2.x route that you would like to convert to >> Rails 3.0? >> > > Hey Conrad, > > I think I made a mistake. > > I was under the impression that following code in rails 2 > map.namespace :admin do |admin| > admin.connect ':controller/:action/:id' > end > was enabling /admin/any_controller/any_action => > Addmin::AnyController#any_action > but it did not. > > instead, the default root was still enabled. The above code never > worked. > > Ultimatly, what I am trying to do, is to use the default root but ONLY > for controllers in a specific namespace (other parts of the application > are using resources)
What your looking for is scope in routes: http://guides.rubyonrails.org/routing.html#controller-namespaces-and-routing scope "/admin" do match ":controller(/:action(/:id))" resources :posts # :controller => PostsController end -- 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@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.