Ruby On Rails: Mongoid has_secure_password

rails No Comment

Here are some things to do to ensure that you can use has_secure_password in your Rails app using Mongoid (Note, my class name is developer. Yours might be user or something else) :

If you scaffolded the user, you might see that password_digest is in the form as a text field. You will want to replace that with a password_field for password.

Last, in your User Controller, you will need to allow password to be accepted as a param and not password digest

That is what I did to get it  working and it works fine.

Leave a Reply

Your email address will not be published. Required fields are marked *