class Category
has_many :clips
end
class Clip
belongs_to :category, :counter_cache = > true
named_scope :converted, :conditions => {:converted => true}
end
- How to update counters if clip changes its category_id ?
- How to implement custom counters by conditions, e.g:
category.clips_count
category.converted_clips_count