Sha256: f2c7e421590445eb35ea2568006b518d407f73358a97a21d87b57673d4256e9f

Contents?: true

Size: 438 Bytes

Versions: 30

Compression:

Stored size: 438 Bytes

Contents

module MnoEnterprise
  class AuditEvent < BaseResource
    def formatted_details
      case details
        when String
          details
        when Hash
          format_serialized_details
        else
          nil
      end
    end

    def format_serialized_details
      AUDIT_LOG_CONFIG.fetch('events', {}).fetch(key, '') % details.symbolize_keys
    rescue KeyError => e
      e.message
      # details.inspect
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
mno-enterprise-core-2.0.4 app/models/mno_enterprise/audit_event.rb
mno-enterprise-core-3.1.0 app/models/mno_enterprise/audit_event.rb
mno-enterprise-core-3.0.3 app/models/mno_enterprise/audit_event.rb
mno-enterprise-core-2.0.3 app/models/mno_enterprise/audit_event.rb
mno-enterprise-core-3.0.2 app/models/mno_enterprise/audit_event.rb
mno-enterprise-core-2.0.2 app/models/mno_enterprise/audit_event.rb
mno-enterprise-core-3.0.1 app/models/mno_enterprise/audit_event.rb
mno-enterprise-core-2.0.1 app/models/mno_enterprise/audit_event.rb
mno-enterprise-core-3.0.0 app/models/mno_enterprise/audit_event.rb
mno-enterprise-core-2.0.0 app/models/mno_enterprise/audit_event.rb