lib/devise/models/rememberable.rb in devise-3.5.6 vs lib/devise/models/rememberable.rb in devise-3.5.7

- old
+ new

@@ -37,11 +37,11 @@ # # lookup the user based on the incoming cookie information # User.serialize_from_cookie(cookie_string) module Rememberable extend ActiveSupport::Concern - attr_accessor :remember_me, :extend_remember_period + attr_accessor :remember_me def self.required_fields(klass) [:remember_created_at] end @@ -69,10 +69,14 @@ def remember_expires_at self.class.remember_for.from_now end + def extend_remember_period + self.class.extend_remember_period + end + def rememberable_value if respond_to?(:remember_token) remember_token elsif respond_to?(:authenticatable_salt) && (salt = authenticatable_salt.presence) salt @@ -150,12 +154,9 @@ token = Devise.friendly_token break token unless to_adapter.find_first({ remember_token: token }) end end - private - - # TODO: extend_remember_period is no longer used Devise::Models.config(self, :remember_for, :extend_remember_period, :rememberable_options, :expire_all_remember_me_on_sign_out) end end end end