# Models and creating a scaffold under another controller

**URL:** <https://www.ruby-forum.com/t/models-and-creating-a-scaffold-under-another-controller/143228>\
**Category:** Rails\
**Created:** [July 16, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/models-and-creating-a-scaffold-under-another-controller/143228 "2008-07-16T16:16:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolas\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f6c823/32.png) [@Nicolas\_K](https://www.ruby-forum.com/u/Nicolas_K)\
**Post date:** [July 16, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/models-and-creating-a-scaffold-under-another-controller/143228/1 "2008-07-16T16:16:37Z")

</div>

Hi,

I’m trying to create a controller and model called Articles (yet  
another blogging system 🙂 ) and put it under a controller called  
admin. I used the following command to do it:

script/generate scaffold admin/article title:string user\_id:integer  
body:text

My issue is with the name that rails gives the model. Instead of  
calling it Article, the model is called Admin\_Article. Is there a way  
to have the scaffold generator create the model as Article instead of  
Admin\_article?

Thank you.

Nicolas K.

---

<div class="post-metadata">

**Author:** ![Nicolas\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f6c823/32.png) [@Nicolas\_K](https://www.ruby-forum.com/u/Nicolas_K)\
**Post date:** [July 16, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/models-and-creating-a-scaffold-under-another-controller/143228/2 "2008-07-16T17:46:49Z")

</div>

I’m not using scaffolding and so I can only guess.  
And you don’t exactly tell us, what Admin is. You say  
it’s a controller, but from what you do, it looks more  
like a namespace.

To generate a controller in namespace admin you  
would do admin::controllername

So  
script/generate scaffold admin::article title:string user\_id:integer  
body:text

Would most likely generate a controller & view in the  
admin namespace
