How to generate reset password token

前端 未结 4 715
一生所求
一生所求 2021-02-12 14:32

I am using devise gem for authentication.

In my application admin will create the users, so I want the user\'s reset password link when admin creates users.

This

4条回答
  •  一向
    一向 (楼主)
    2021-02-12 15:23

    If you don't want it to send the instructions, just set and store the token you can call the private method in devise recoverable concern set_reset_password_token.

    You can do this by doing something like user.send(:set_reset_password_token).

提交回复
热议问题