Module: AccessLogging::Model
- Extended by:
- ActiveSupport::Concern
- Includes:
- DateRangeScopes
- Defined in:
- lib/access_logging/model.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- REDIS_ATTRIBUTES =
[ :created_at, :ip, :user_type, :user_id, :verb, :model_type, :model_id, :description, :path ]
- REDIS_SEPARATOR =
"||"
Instance Method Summary collapse
Instance Method Details
#created_at ⇒ Object
76 77 78 |
# File 'lib/access_logging/model.rb', line 76 def created_at self[:created_at] ||= Time.zone.now end |
#redis_string ⇒ Object
80 81 82 |
# File 'lib/access_logging/model.rb', line 80 def redis_string REDIS_ATTRIBUTES.map { |attribute| send(attribute) }.join(REDIS_SEPARATOR) end |