module Devise::Models::Rememberable::ClassMethods
def remember_token #:nodoc:
Generate a token checking if one does not already exist in the database.
def remember_token #:nodoc: loop do token = Devise.friendly_token break token unless to_adapter.find_first({ remember_token: token }) end end
def serialize_from_cookie(*args)
def serialize_from_cookie(*args) id, token, generated_at = *args record = to_adapter.get(id) record if record && record.remember_me?(token, generated_at) end
def serialize_into_cookie(record)
def serialize_into_cookie(record) [record.to_key, record.rememberable_value, Time.now.utc.to_f.to_s] end