Module: Barjillo::ActAsAuthModel::InstanceMethods

Defined in:
lib/barjillo/act_as_auth_model.rb

Instance Method Summary collapse

Instance Method Details

#authenticated?(password) ⇒ Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/barjillo/act_as_auth_model.rb', line 37

def authenticated?(password)
  encrypted_password == encrypt(password)
end

#forgot_password!Object



46
47
48
49
# File 'lib/barjillo/act_as_auth_model.rb', line 46

def forgot_password!
  generate_confirmation_token
  save(:validate => false)
end

#reset_remember_token!Object



41
42
43
44
# File 'lib/barjillo/act_as_auth_model.rb', line 41

def reset_remember_token!
  generate_remember_token
  save(:validate => false)
end