def self.auth(email_try, pass_try)
pass_try = Digest::SHA1.hexdigest(pass_try)
u = User.where("email = ? AND pass = ?", email_try, pass_try)
return u unless u.blank?
nil
end
Chciałbym zapytać czy wg Was takie coś wystarczy? Czy może lepszym wyjściem będzie jakiś plugin (może jakiś co implementuje REST)?
Brak komentarzy:
Prześlij komentarz