spree/spree — Issue #774: Product Groups are not updated when deleting a Property
Author: vandrijevik
Created: 2011-11-16 18:53:31+00:00
State: open

Seeing as how `Product#update_memberships` is called in an `after_save` callback on `Product`, deleting a `Property` which affects a `ProductGroup` does not update the `ProductGroup`.

To replicate:

1. Create a Property called “test”.
1. Create a Product Group where the product scope tests for Products which have the property “test”.
1. Add the property “test” to at least one Product.
1. Delete the Property called “test”.
1. Observe that instead of having 0 Products (because deleting the Property deleted its ProductProperties), the Product Group’s count and claimed Products does not change.