I'm looking for a solution that does not involve an extra library/module, only Devise. How can I make the admin the only one who can create new users?
I have my model Users, created by the Devise, and I included the column Admin (boolean) with the default value set to false. After that, I generated the devise controllers with this command:
rails generate devise:controllers Users
But now I don't know what to do really...
I already found some stackoverflow questions that are quite similar, but none answered my question. I'm trying to accomplish this without generating a new controller, only using the subclass generated by the command above. Hope you can help me.
Thank you!
UPDATE:
I want to do something similar to the last answer of this stackoverflow question but I can't put that to work :/