Class: Impresser::ActiveRecord::User

Inherits:
Base
  • Object
show all
Includes:
Impresser::Authenticate
Defined in:
lib/impresser/active_record/user.rb

Instance Method Summary collapse

Methods included from Impresser::Authenticate

included

Methods inherited from Base

#unserialize

Instance Method Details

#user_pass=(plain_password) ⇒ Object



23
24
25
26
27
# File 'lib/impresser/active_record/user.rb', line 23

def user_pass=(plain_password)
  unless plain_password.empty?
    write_attribute(:user_pass, hash_password(plain_password.to_s))
  end
end

#user_pass_confirmation=(plain_password) ⇒ Object



29
30
31
32
33
# File 'lib/impresser/active_record/user.rb', line 29

def user_pass_confirmation=(plain_password)
  unless plain_password.empty?
    write_attribute(:user_pass_confirmation, hash_password(plain_password.to_s))
  end
end