ここにいくつかのコードがあります
class group < ActiveRecord::Base
has_many :memberships, :dependent => :destroy
has_many :members, :through => :memberships, :source => :person
:conditions => ['memberships.pending = ? ', false]
......
今、メンバーに counter_cache を追加したいと思います。条件スキーマのため、メンバーではなくメンバーシップに counter_cache を追加できません。しかし、個人クラスはグループに属していません。多くのメンバーシップがあり、メンバーシップはグループに属しています。:counter_cache スキーマはどこに追加すればよいですか?
または、要件をどのように実装できますか:メンバーシップに counter_cache を追加します
どうも