Vote count:
0
How can the below (specifically User.exists?(column => self[column])
) be re-written in Ruby's 1.9 hash syntax?
def generate_token(column)
begin
self[column] = SecureRandom.urlsafe_base64
end while User.exists?(column => self[column])
end
asked 49 secs ago
Aucun commentaire:
Enregistrer un commentaire