Class: SessionsController
- Inherits:
-
Devise::SessionsController
- Object
- Devise::SessionsController
- SessionsController
- Defined in:
- app/controllers/sessions_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
In order to automatically remember users in devise, i.e.
- #destroy ⇒ Object
Instance Method Details
#create ⇒ Object
In order to automatically remember users in devise, i.e. without having to check the “remember me” checkbox, we override the setting here.
stackoverflow.com/questions/14417201/how-to-automatically-keep-user-remembered-in-devise
Furthermore, this registers the session with the metric service in order to track the users’ activities.
11 12 13 14 |
# File 'app/controllers/sessions_controller.rb', line 11 def create super metric_logger.register_session end |
#destroy ⇒ Object
16 17 18 19 |
# File 'app/controllers/sessions_controller.rb', line 16 def destroy current_user.update_last_seen_activity(nil) if current_user super end |