-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
A subscription has many packs. ShippingPack belongs_to a subscription, is counter_cached there. ShippingPacks inherit from Pack.
[29] pry(main)> Subscription.reset_counters('5169a505196ebff8ad00001d', :packs) => [:packs] [30] pry(main)> Mongoid::IdentityMap.clear => {} [31] pry(main)> Subscription.find('5169a505196ebff8ad00001d')[:packs_count] => nil [43] pry(main)> Subscription.find('5169a505196ebff8ad00001d')[:shipping_packs_count] => 3
I would expect packs_count to be three, and shipping_packs_count to be 0. I.e., it should use the named association's name.
Can write a pull if this makes sense.