Created
January 7, 2011 16:21
-
-
Save frnz/769686 to your computer and use it in GitHub Desktop.
Hash
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
{:password=>"39c8e9953fe8ea40ff1c59876e0e2f28", "username"=>"mitasdf", "password"=>"sdfsdfsdfsdf", "email"=>"[email protected]"} | |
Es que pensé que se usaba [:password] en params (como rails). Nada más usá "password" en lugar de :password: | |
def encript(hash) | |
# Devuelve el mismo hash, pero haciéndole digest al password | |
hash["password"] = Digest::MD5.hexdigest(hash["password"]) | |
return hash | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah, ahi vi la diferencia, que paja. Gracias Franz!