I'm having a bit of trouble in terms of what I should add to my models and migrations to create a counter_cache for a has_many :through relationship. Here are my models:
has_many :patches has_many :tactic_revisions, :through => :patches
belongs_to :game, counter_cache: true has_many :tactic_revisions
belongs_to :tactic, counter_cache: true belongs_to :patch, counter_cache: true
I'm trying to use a counter_cache to store how many TacticRevisions a Game has but unsure how to go about this. Any ideas?