I've set up some counter_caches in my app before but only for simple belongs_to relationships.
I'm doing a lot of queries like
user.collections.got.count
where got is a scope in my collection model
belongs_to :user
scope :got, -> { where(status: 'Got') }
Can I set up a counter_cache to count the number of user.collections that are marked as "got"? The problem I see is that counter_cache only updates with create or destroy but not update actions. Is there a good method for this?