From 27ca264d2333a8756bdf4f918356ad897589e99f Mon Sep 17 00:00:00 2001 From: Michael Bianco Date: Sun, 15 Jul 2012 23:14:25 -0300 Subject: [PATCH] Fixed variant deletion bug --- app/models/spree/variant_decorator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/spree/variant_decorator.rb b/app/models/spree/variant_decorator.rb index e090aa4..6a17d57 100644 --- a/app/models/spree/variant_decorator.rb +++ b/app/models/spree/variant_decorator.rb @@ -14,7 +14,7 @@ Spree::Variant.class_eval do # We need to delete the Digital manually here as soon as the Variant is nullified. # Otherwise you'll have orphan Digitals (and their attached files!) associated with unused Variants. def destroy_digital - digital.destroy + digitals.map &:destroy end end