2 ms·
By the way there is counter_culture[1] which is great for more complex counter caches: Inventory: product quantity 1 2 1 5 2
by dorianm 10y ago
By the way there is counter_culture[1] which is great for more complex counter caches:
Inventory:
product quantity
1 2
1 5
2 -1
2 3
2 10
And having a counter cache for the sum per product (e.g.: product.inventory_quantity).
[1]: https://github.com/magnusvk/counter_culture https://github.com/magnusvk/counter_culture
- amk_ 10y agoThat looks useful, thanks