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

Does not work with counter_cache #126

Open
hrdwdmrbl opened this issue Apr 25, 2022 · 0 comments
Open

Does not work with counter_cache #126

hrdwdmrbl opened this issue Apr 25, 2022 · 0 comments

Comments

@hrdwdmrbl
Copy link

Rails version 6

When upserting, association counter caches do not get incremented.

It looks like counter caches do not get incremented with normal callbacks: https://github.com/rails/rails/blob/v6.1.5/activerecord/lib/active_record/counter_cache.rb#L165

I fixed it by incrementing the counters myself but it feels bad :)

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

No branches or pull requests

1 participant