Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't update counter cache unless the record is actually saved #33913
This is a 4th attempt to make counter cache transactional completely.
All existing counter cache issues (increment/decrement twice, lost
We have the
We already have handling counter cache after create/update/destroy,
so just removing assigning logic on the belongs_to association makes