Module: AgentCode::HasAuditTrail

Extended by:
ActiveSupport::Concern
Defined in:
lib/agentcode/concerns/has_audit_trail.rb

Overview

Automatic change logging concern. Mirrors the Laravel HasAuditTrail trait.

Tracks: created, updated, deleted, force_deleted, restored Records: old/new values, user_id, organization_id, ip_address, user_agent

Usage: class Post < ApplicationRecord include AgentCode::HasAuditTrail

# Optional: exclude sensitive fields from audit logging
agentcode_audit_exclude :password, :remember_token
end