search for: active_tracks_count

Displaying 1 result from an estimated 1 matches for "active_tracks_count".

2008 Jun 03
1
Custom counter cache
...lass Track belongs_to :category, :counter_cache => true named_scope :converted, :conditions => {:converted => true} named_scope :active, :conditions => {:active => true} end I want to make custom counters for scoped associations, e.g: category.converted_tracks_count category.active_tracks_count And when `track` changes its converted, active, and category_id status counters must be updated. Any suggestions? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this...