I have implemented Devise in a Rails 3 application and I need admin users to be able to manage users. Users are not registerable and therefore an admin must create accounts. What would be the best way to go about this?
It doesn't seem very DRY to create my own UsersController
when Devise already provides Devise::RegistrationController
but I don't see any other options.
I opted to create my own UsersController
along side the RegistrationController
. It really makes sense to have my own RESTful controller for admin purposes. It's not devise's job to manage user records and maintain administrative fields associated with them. It is, after all, an authentication framework. It just seems correct to leave it to do what it is designed for. You are required to create your own user model for a reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With