module Audited::Auditor::AuditedInstanceMethods

Public Instance Methods

audited_async_enabled?() click to toggle source
# File lib/audited_async.rb, line 55
def audited_async_enabled?
  self.class.auditing_enabled && self.class.audited_async_enabled?
end
perform_async_audit(method, changes = nil) click to toggle source
# File lib/audited_async.rb, line 79
def perform_async_audit(method, changes = nil)
  AuditedAsync.config
              .job
              .set(AuditedAsync.config.job_options)
              .perform_later class_name: self.class.name,
                             record_id: send(self.class.primary_key.to_sym),
                             action: method,
                             audited_changes: (changes || audited_attributes).to_json,
                             comment: audit_comment
end