lib/sorcery/model/submodules/remember_me.rb in sorcery-0.5.2 vs lib/sorcery/model/submodules/remember_me.rb in sorcery-0.5.3
- old
+ new
@@ -1,9 +1,10 @@
module Sorcery
module Model
module Submodules
- # The Remember Me submodule takes care of setting the user's cookie so that he will be automatically logged in to the site on every visit,
+ # The Remember Me submodule takes care of setting the user's cookie so that he will
+ # be automatically logged in to the site on every visit,
# until the cookie expires.
module RememberMe
def self.included(base)
base.sorcery_config.class_eval do
attr_accessor :remember_me_token_attribute_name, # the attribute in the model class.
@@ -29,11 +30,11 @@
module ClassMethods
protected
def define_remember_me_mongoid_fields
- field sorcery_config.remember_me_token_attribute_name, type: String
- field sorcery_config.remember_me_token_expires_at_attribute_name, type: DateTime
+ field sorcery_config.remember_me_token_attribute_name, :type => String
+ field sorcery_config.remember_me_token_expires_at_attribute_name, :type => Time
end
end
module InstanceMethods
\ No newline at end of file