3 class User < ActiveRecord::Base
6 validates_confirmation_of :pass_crypt
9 # write_attribute("pass_crypt", Digest::MD5.hexdigest(str))
14 # return self.pass_crypt
17 # def self.authenticate(username, passwd)
18 # find_first([ "display_name = ? AND pass_crypt =?",
20 # Digest::MD5.hexdigest(passwd) ])