Sha256: 830b7d372e0b64078a2f6292cf7b1f01e59fcfbaea280373d5b31c6af0d7cc4b
Contents?: true
Size: 563 Bytes
Versions: 6
Compression:
Stored size: 563 Bytes
Contents
class BrickLayer::Administrator include Mongoid::Document include ActiveModel::SecurePassword field :full_name, type: String field :username, type: String field :email, type: String field :password_digest, type: String has_secure_password attr_accessible :full_name, :email, :username, :password, :password_confirmation validates :username, :presence => true, :uniqueness => true def self.authenticate(username, password) where(:username => username).try(:first).try(:authenticate, password) end end
Version data entries
6 entries across 6 versions & 1 rubygems