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
70 71 72 |
# File 'lib/access_logging/model.rb', line 70 def created_at self[:created_at] ||= Time.zone.now end |
#redis_string ⇒ Object
74 75 76 |
# File 'lib/access_logging/model.rb', line 74 def redis_string REDIS_ATTRIBUTES.map { |attribute| send(attribute) }.join(REDIS_SEPARATOR) end |