Skip to content

Conversation

@chaadow
Copy link

@chaadow chaadow commented Dec 24, 2024

The main use case is that audited allows users to update the audited options by calling audited multiple times.

# This create two callbacks `after_update` and `after_destroy`
audited on: [:update, :destroy]

# Now if we call audited a second time
# this unfortunately won't create the `after_create` callback when updating the configuration
audited on: [:update, :destroy, :create]

This pull requests fixes the issue so that it creates callbacks only for added configuration, in the example above it's the create one.

@amkisko
Copy link

amkisko commented Jan 7, 2025

Hey! Does this happen when you inherit the base class with audited call?

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.

2 participants