Module: Sorcery::Controller::Submodules::ActivityLogging
- Defined in:
- lib/sorcery/controller/submodules/activity_logging.rb
Overview
This submodule keeps track of events such as login, logout, and last activity time, per user. It helps in estimating which users are active now in the site. This cannot be determined absolutely because a user might be reading a page without clicking anything for a while. This is the controller part of the submodule, which adds hooks to register user events, and methods to collect active users data for use in the app. see Socery::Model::Submodules::ActivityLogging for configuration options.
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/sorcery/controller/submodules/activity_logging.rb', line 15 def self.included(base) base.send(:include, InstanceMethods) Config.after_login << :register_login_time_to_db Config.before_logout << :register_logout_time_to_db base.after_filter :register_last_activity_time_to_db end |