Devise password reset from Rails console

后端 未结 8 1055
梦毁少年i
梦毁少年i 2021-01-30 01:38

While running an app how do you select a user by email address and then set the password manually within rails console for Devise?

Also, where would I go to

8条回答
  •  星月不相逢
    2021-01-30 02:09

    Modern devise allows simpler syntax, no need to set the confirmation field

    user.password = new_password; user.save
    # or
    user.update(password: new_password)
    

提交回复
热议问题