# Problem generating scaffold with a namespace

**URL:** <https://www.ruby-forum.com/t/problem-generating-scaffold-with-a-namespace/111406>\
**Category:** Rails\
**Created:** [August 7, 2007, 1:14am UTC](https://www.ruby-forum.com/t/problem-generating-scaffold-with-a-namespace/111406 "2007-08-07T01:14:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephenT](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@stephenT](https://www.ruby-forum.com/u/stephenT)\
**Post date:** [August 7, 2007, 1:14am UTC](https://www.ruby-forum.com/t/problem-generating-scaffold-with-a-namespace/111406/1 "2007-08-07T01:14:35Z")

</div>

I’m trying to generate a scaffold based on a model in a namespace and  
I would like the controller to have a similar namespace.

Am I thinking that scaffold should be doing something it doesn’t or is  
this a bug?

rails version: 1.2.3  
ruby version: 1.8.5  
OS: OS X 10.4.10

Created a model using

> script/generate model Foo::Bar  
> creates the model bar.rb in the model/foo directory and the migration  
> for table foo\_bars  
> and migrated to generate the table in the DB

> script/generate scaffold Foo::Bar Foo::Bar  
> – responds "try creating a table for your model (Foo::Bar)

if I try

> script/generate scaffold FooBar Foo::Bar  
> creates the controller structure correctly (controllers/foo/  
> bar\_controller.rb) but adds the dependency model  
> models/foo\_bar.rb
