# File lib/audited/auditor.rb, line 159 def own_and_associated_audits Audited.audit_class.unscoped .where('(auditable_type = :type AND auditable_id = :id) OR (associated_type = :type AND associated_id = :id)', type: self.class.name, id: id) .order(created_at: :desc) end