Hi guys,
Right now when using counter_cache and using delete to destroy associated records, for example: @post.comments.delete(comment) the cache column is not being updated.
This was reported in ticket #1196, i confirmed it was actually a bug, and made a patch to fix this with tests for has_many and HMT associations.
It’s working if you use record.destroy, but it should also be updated when using delete.
Ticket/Patch: http://rails.lighthouseapp.com/projects/8994/tickets/1196-counter_cache-not-decrementing-on-delete