Last active
December 11, 2015 01:18
-
-
Save aalvesjr/4522226 to your computer and use it in GitHub Desktop.
Setter password de User
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def password=(password) | |
# O ideal seria extrair o Digest::SHA1.hexdigest | |
# para uma classe responsavel por encriptar a senha | |
value = Digest::SHA1.hexdigest(password) | |
write_attribute(:password, value) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment