Models and creating a scaffold under another controller


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

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

Thank you.

Nicolas Kassis

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

script/generate scaffold admin::article title:string user_id:integer

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