Rails 3 Namedspace Controller Scaffold with a Simple Model

Hi there,

i’m trying to create a namedspace controller with scaffold, but I don’t
want my model to be under the namespace. Is there any way to do it?

rails g scaffold admin/user

Thanks in advance,
David S.

Hi,

You can’t do that with the scaffold generator, you must use :

  • rails g controller …
  • rails g model …
  • rails g helper …

Otherwise, you can run :

  • rails g scaffold admin/user
  • rails d model admin/user
  • rails g model user

And remove in model folder admin.rb file and admin folder.

Le lundi 15 octobre 2012 13:41:49 UTC+2, Ruby-Forum.com User a crit :

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs