A
A
Alexander Petrov2017-03-14 15:52:57
Ruby on Rails
Alexander Petrov, 2017-03-14 15:52:57

How to register a user if I am authorized in devise?

Friends, I won't cut it. I am authorized, there is a personal account (essentially a page that only authorized users have access to) and I need to register a new person. If I am authorized, then this cannot be done, registration does not pass. Moreover, if I am not authorized, then the form works fine and registers at least 100 users. How to allow registration if I'm logged in?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Demidenko, 2017-03-15
@Dem1

You have a rollback, so validation does not occur
Save with save!, namely with ! sign, will throw an error, you will see which one).
Most likely there is no password.
For invites use devise_invitable

O
Oleg Kulakov, 2017-03-14
@Morphine43

Perhaps I didn’t quite understand, but what prevents you from creating a form that will save a new user through the User model?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question