Sha256: 27e58562833fee5baeb192e774e8fe2e226f19f52fe6fb8d6bd073ad3350c3f1
Contents?: true
Size: 453 Bytes
Versions: 7
Compression:
Stored size: 453 Bytes
Contents
require 'eucalypt/eucalypt-security/namespaces/security-warden/user_confirm' class User < ActiveRecord::Base validates :username, presence: true, uniqueness: true validates :encrypted_password, presence: true include BCrypt def authenticate(attempt) Password.new(self.encrypted_password) == attempt end def password=(entered_password) @password = Password.create(entered_password) self.encrypted_password = @password end end
Version data entries
7 entries across 7 versions & 1 rubygems