开发者

rails password update issue

开发者 https://www.devze.com 2023-01-22 07:21 出处:网络
I am making a update password module for an application in rails. Now the problem is that I am encrypting the password before_sav开发者_开发百科e, and it is required that the password be between 6 to

I am making a update password module for an application in rails. Now the problem is that I am encrypting the password before_sav开发者_开发百科e, and it is required that the password be between 6 to 20, so after encryption the password becomes 64 chars, but since the encryption happens after validations, the code works. Now when I want to update the password, it may so happen that the user may not want to change his password. In such a case he leaves the password field empty, but now the form will not validate. How do i get around this?


This is the simplest approach for password management - Ruby on Rails Password Hashing Module

But I would recommend you to use Authlogic

0

精彩评论

暂无评论...
验证码 换一张
取 消