Forum: Ruby on Rails Help with Namespaces

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
648a71a35ce6e4a1c5cd63451a2a20df?d=identicon&s=25 Gavin Morrice (dr_gavin)
on 2009-01-12 11:43
(Received via mailing list)
This is frustrating the hell out of me!

I have an application in which the controllers are split into two
groups, public and private.

In my routes file, I've split them into namespaces:

map.namespace :private do |private|
    private.resources :batches
    private.resources :cities


and so on.

When I run rake routes, it tells me what I expect to see:
         private_batches GET    /private/batches
{:controller=>"private/batches", :action=>"index"}


But if I go to /private/batches I get the error message:

No route matches "/private/batches" with {:method=>:get}

It's probably something really obvious that I'm missing but can anyone
help out?
661ae6e97d0e16c2af2aaf7d197e8387?d=identicon&s=25 Sijo k g (sijo)
on 2009-01-12 13:09
   Can you try like
./script/generate scaffold private/Batch
./script/generate scaffold private/City

 map.namespace :private do |private|
     private.resources :batches
     private.resources :cities
                But you will have to reedit the helper methods in
various html.erb files before make this to work

This topic is locked and can not be replied to.