Anyone used a acts_as_votable gem? I need to query the number of votes for an activity. How can I use counter_cache here?
I’d always recommend reading the documentation for any gem, to see if they’ve already answered your question.
In the case of “acts_as_votable”, read the section on caching, here: GitHub - ryanto/acts_as_votable: Votable ActiveRecord for Rails