app/models/user.rb
# There are two possible attributes for this method:
# -remember
# -activation
# -password_reset
# They correspond to model virtual fields:
# -rember_token
# -activation_token
# -password_reset_token
# Also, note that there is similar method 'authenticate' provided by
# has_secure_password method intended to confirm if user password is correct.
There are two possible attributes for this method:
remember
activation
password_reset
They correspond to model virtual fields:
rember_token
activation_token
password_reset_token
Also, note that there is similar method 'authenticate' provided by
has_secure_password method intended to confirm if user password is correct.
There are two possible attributes for this method : remember activation password_reset They correspond to model virtual fields : rember_token activation_token password_reset_token Also note that there is similar method ' authenticate ' provided by has_secure_password method intended to confirm if user password is correct .
def authenticated?(attribute, token)
    digest = send("#{attribute}_token_digest")
    return false if digest.nil?
    BCrypt::Password.new(digest).is_password?(token)
  end
def authenticated? ( attribute , token ) digest = send ( "#{attribute}_token_digest" ) return false if digest . nil? BCrypt :: Password . new ( digest ) . is_password? ( token ) end
There are two possible attributes for this method:
remember
activation
password_reset
They correspond to model virtual fields:
rember_token
activation_token
password_reset_token
Also, note that there is similar method 'authenticate' provided by
has_secure_password method intended to confirm if user password is correct.
There are two possible attributes for this method : remember activation password_reset They correspond to model virtual fields : rember_token activation_token password_reset_token Also note that there is similar method ' authenticate ' provided by has_secure_password method intended to confirm if user password is correct .
attribute
<not_specific>
token
<not_specific>