Devise password reset from Rails console

后端 未结 8 962
梦毁少年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 01:51

    User.find_by_email('joe@example.com').update_attributes(:password => 'password')
    

提交回复
热议问题