Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support prebuilt counter cache association list #554

Merged

Conversation

JoeDupuis
Copy link
Contributor

@JoeDupuis JoeDupuis commented Mar 8, 2024

Fixes #552

Rails 7.2 will remove each_counter_cached_associations which was the hook to bypass incrementing/decrementing the counter.
This change overrides the new counter cache list and uses it as the new hook to bypass updating the counter when it is present, else it falls back to the old behavior.

@mathieujobin mathieujobin merged commit de74493 into rubysherpas:core Mar 12, 2024
25 checks passed
@mathieujobin
Copy link
Collaborator

Thanks a lot for this fix

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.

Rails main - no superclass method `each_counter_cached_associations'
2 participants