Devise: How to create a new user being already logged in?

后端 未结 8 2109
独厮守ぢ
独厮守ぢ 2021-02-02 16:22

I\'m going to create a multi user app, so, I will have a admin user that will have permission to create new ones.

I\'ve created the UsersControllerbut when

8条回答
  •  别那么骄傲
    2021-02-02 16:50

    I added in the Registrations Controller:

    class RegistrationsController < Devise::RegistrationsController
        ...
        skip_before_action :require_no_authentication, only: [:new, :create]
        ...
    end
    

    And it worked for me. I can now go and create a new user.

提交回复
热议问题