Sha256: 532654bccd81d5d4c3e941d9023c3bf594c16ee6904cd76c02bc63728e8f825f
Contents?: true
Size: 893 Bytes
Versions: 4
Compression:
Stored size: 893 Bytes
Contents
require "session_logger/session_logging" module SessionLogger # --------------------------------------------- Rails injection # This injects the session logging class methods into the action_controller ActiveSupport.on_load(:action_controller) do include SessionLogger::SessionLogging end # --------------------------------------------- Configuration # Defines the session_logger configuration keys for usage in application.rb SessionLoggerConfig = Struct.new(:logged_models, :model_prefix) @@config = SessionLoggerConfig.new #Allows the initializer to set the configuration for session_logger def self.configure(&block) block.call(@@config) end def self.logged_models #Returns a list of models (dependant on rails conventions in the models dir) @@config.logged_models end def self.model_prefix @@config.model_prefix ||= "sl_" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
session_logger-1.0.4 | lib/session_logger.rb |
session_logger-1.0.3 | lib/session_logger.rb |
session_logger-1.0.2 | lib/session_logger.rb |
session_logger-1.0.1 | lib/session_logger.rb |