Counter Cache Improvements

Also reviewing this gem may be of value in terms of considering changes to counter caches.

https://github.com/bestvendor/counter_culture

Cheers,

Anthony

Thanks for the feedback guys. Yes, I was thinking about adding an optional proc to the counter_cache call which can hold the predicate. So without it, counter_cache just operates as it does today but if it’s given a proc then it will use this when counting.

I’m happy to give it a try, the rails code base is a little daunting but I’m up for the challenge. I’ll take some time to research and will probably bug you guys here with silly questions if that’s ok ;o)

Cheers

Andy