Devise password reset from Rails console

ylluminate picture ylluminate · Nov 29, 2011 · Viewed 68.4k times · Source

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 review documentation to cover more details in this regard to manipulation of accounts while using Devise?

Answer

Sergio Tulentsev picture Sergio Tulentsev · Nov 29, 2011

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

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