Nested resources with nested controllers

Is there a way to create resources that work with nested controllers?
For example:

./script/generate scaffold_resource project name:string
mkdir app/views/layouts/project # so the command below doesn’t
./script/generate scaffold_resource project::user name:string


map.resources :projects do |project|
project.resources :users

After creating a project and trying to list it’s users by using
/projects/1/users it will give the error:

Processing ApplicationController#index (for at 2007-01-10
20:31:39) [GET]
Session ID: effe3a9a1b3131e75c4507fc92eb01d5
Parameters: {“project_id”=>“1”, “action”=>“index”,

NameError (uninitialized constant UsersController):


Looking in rails/railties/lib/rails_generator/generators/compon
ents/scaffold_resource/scaffold_resource_generator.rb there seems to be
some logic for nesting controllers but I can’t figure out how it is
supposed to be used.