app/models/user.rb
def authenticated?(remember_token)
      if remember_digest.nil?
        false
      else
        BCrypt::Password.new(remember_digest).is_password?(remember_token)
      end
    end
#if target token matches digest, return true
if target token matches digest, return true
if target token matches digest return true
def authenticated?(remember_token)
      if remember_digest.nil?
        false
      else
        BCrypt::Password.new(remember_digest).is_password?(remember_token)
      end
    end
def authenticated? ( remember_token ) if remember_digest . nil? false else BCrypt :: Password . new ( remember_digest ) . is_password? ( remember_token ) end end
if target token matches digest, return true
if target token matches digest return true
remember_token