Allow a user to add new users in Devise, and remain logged in as themselves

前端 未结 4 1659
深忆病人
深忆病人 2020-12-08 23:45

I am using Ruby On Rails with Devise, Rails 4.1.0.rc1, Ruby 2.1.0p0, devise-3.2.4

I followed the tutorial from Rails Cast Episode #209 to get devise installed and wo

4条回答
  •  庸人自扰
    2020-12-09 00:17

    As i understood your question(text part, not read the code), you want users to add other users and the accounts should be ready to be used. TO register using devise, you would be using user email, password and password_confirmation field as mandatory.

    When registering users with email, provide a dummy password to the accounts so that the user entry is being saved. Send mails to the users to confirm their account and change password using the password reset links.

提交回复
热议问题