Skip to content

Add support for audit association extensions to has_associated_audits#767

Open
coalest wants to merge 1 commit intocollectiveidea:mainfrom
coalest:add-extensions-support-to-has_associated_audits
Open

Add support for audit association extensions to has_associated_audits#767
coalest wants to merge 1 commit intocollectiveidea:mainfrom
coalest:add-extensions-support-to-has_associated_audits

Conversation

@coalest
Copy link

@coalest coalest commented Dec 5, 2025

This PR adds support for association extensions to has_associated_audits.

Example usage:

class User < ActiveRecord
  audited
  has_associated_audits do
    def updates
      where(action: :update)
    end
  end
end

user.audits.updates # retrieve only update audits

If there is any interest in this, I can add some documentation and tests to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant