Module: Trestle::Auth::ModelMethods::Rememberable::ClassMethods

Defined in:
lib/trestle/auth/model_methods/rememberable.rb

Instance Method Summary collapse

Instance Method Details

#authenticate_with_remember_token(token) ⇒ Object



20
21
22
23
# File 'lib/trestle/auth/model_methods/rememberable.rb', line 20

def authenticate_with_remember_token(token)
  user = find_by(remember_token: token)
  user if user && !user.remember_token_expired?
end