I have an interesting issue that the online docs aren’t helping me with.
In my app I have 4 models
Item < ActiveRecord
Deal < Item
Product < Item
Category < ActiveRecord
Item has_and_belongs_to_many :categories…
On each category record I’d like to maintain a product_count and
to increase performance. This doesn’t appear possible with the current
Anyone have ideas on how to approach this?
In the past I’ve just run an hourly cron task to calculate & update all
records of this type, but I feel this probably isn’t the most efficient