Class: Accounts::Account

Inherits:
Object
  • Object
show all
Includes:
DataMapper::Resource
Defined in:
lib/accounts/model.rb

Instance Method Summary collapse

Methods included from DataMapper::Resource

#taint!

Instance Method Details

#confirm_password(arg) ⇒ Object



74
75
76
# File 'lib/accounts/model.rb', line 74

def confirm_password(arg)
  self.class.hashpasswd(arg) == self.password
end

#set_password(arg) ⇒ Object



70
71
72
# File 'lib/accounts/model.rb', line 70

def set_password(arg)
  self.update :password => self.class.hashpasswd(arg)
end