I’ve got a Rails app with a ‘User’ model and a ‘users’ controller.
The users controller handles user registration in the Rails app.
I’d like to build a user admin feature using a namespaced controller
titled ‘admin/users’. Since all I need are the basic CRUD functions,
is it possible to generate a scaffold for the User model in the ‘admin/
users’ controller?
It can create the standard CRUD scaffolding you’re looking for, or
setup views that work with other plugins/gems like auto_complete,
paperclip, etc. It won’t support specifying a namespace, although
that’s an interesting idea. You will have to:
Move/rename your existing users controller and view code; leave the
user model there
Use view mapper to create a new controller/view for users
Move the new one to admin/users and restore your old code.