Models and creating a scaffold under another controller

Hi,

I’m trying to create a controller and model called Articles (yet
another blogging system :slight_smile: ) 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.

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