Search code examples
ruby-on-railsdeviseactivescaffold

How I can create a CRUD (like scaffold) for Users with devise?


I just wanna that an admin can create, read, update,and delete (CRUD) normal users with the gem devise. I saw a tutorial with scaffold, but scaffold is just for CRUD, not for a login :/ I know, this question its so bad, but I not have idea


Solution

  • Rails' generators are meant to get you up and running quickly and, by no means, are meant to replace writing code. You could create this admin-like ability easily by using http://api.rubyonrails.org/classes/ActionController/HttpAuthentication/Basic.html and then hand-writing (scary) the controller and views yourself.

    But if you want to cheat, rails g scaffold_controller User email:string