cpz3yg
Last Updated: February 25, 2016
·
2.873K
· kennu
F8828772ff141a7cb8fe109af7948da1

Failing to change user password in Rails console

When trying to change a Devise user password manually in the Rails console, if user.save always returns false:

user = User.where(email:'me@example.com').first
user.password = 'pass'
user.password_confirmation = 'pass'
user.save
=> false

The problem might be that your password is too short! :-) Check user.errors for details of the issue.

Say Thanks
Respond
Awesome Job

E20ce6a2 ca1f 11e7 82be 7f617c8310c9
SENIOR DEVELOPER (m/w)
·
Berlin, Köln, Hamburg, München
·
Full Time