Module: Sorcery::Model::Submodules::RememberMe::InstanceMethods
- Defined in:
- lib/sorcery/model/submodules/remember_me.rb
Instance Method Summary collapse
-
#forget_me! ⇒ Object
You shouldn’t really use this one yourself - it’s called by the controller’s ‘forget_me!’ method.
-
#remember_me! ⇒ Object
You shouldn’t really use this one yourself - it’s called by the controller’s ‘remember_me!’ method.
Instance Method Details
#forget_me! ⇒ Object
You shouldn’t really use this one yourself - it’s called by the controller’s ‘forget_me!’ method.
57 58 59 60 61 |
# File 'lib/sorcery/model/submodules/remember_me.rb', line 57 def forget_me! config = sorcery_config self.update_many_attributes(config.remember_me_token_attribute_name => nil, config.remember_me_token_expires_at_attribute_name => nil) end |
#remember_me! ⇒ Object
You shouldn’t really use this one yourself - it’s called by the controller’s ‘remember_me!’ method.
50 51 52 53 54 |
# File 'lib/sorcery/model/submodules/remember_me.rb', line 50 def remember_me! config = sorcery_config self.update_many_attributes(config.remember_me_token_attribute_name => TemporaryToken.generate_random_token, config.remember_me_token_expires_at_attribute_name => Time.now.in_time_zone + config.remember_me_for) end |