Displaying 1 result from an estimated 1 matches for "active_items_count".
2006 Feb 27
0
Better counter_caches
...nting/decrementing
"#{table_name}_count" when an item is created or destroyed. I think it''d
be useful if :counter_cache also had this functionality:
- ability to specify the count columns (I also maintain counts of active
members, items, etc.; so..."active_members_count, active_items_count,
...")
- ability to specify a function (probably belonging to the parent model)
which could inspect the child object, which of its properties (like via
PostgreSQL''s OLD/NEW vars) changed, then update count columns
accordingly.
Any other thoughts?
Joe
--
Posted via http://www....