Sha256: fd470cab10bd51c4cdb85039bb7fe6255e9198559e8a0b06d3d034e270c8d768
Contents?: true
Size: 598 Bytes
Versions: 2
Compression:
Stored size: 598 Bytes
Contents
# encoding: utf-8 require 'bcrypt' module Fastui class MPerson < MObject attr_accessible :username, :password, :access_level has_many :m_role_assignments, :foreign_key => 'm_person_id', :class_name => 'Fastui::MRoleAssignment' has_many :m_roles, :through => :m_role_assignments, :source => :m_role # users.password_digest in the database is a :string include BCrypt def password @password ||= Password.new(self.password_digest) end def password=(new_password) self.password_digest = Password.create(new_password) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fastui-0.1.8 | app/models/fastui/m_person.rb |
fastui-0.1.7 | app/models/fastui/m_person.rb |