Update soft-delete of variants

Spree changed their way of soft-deleting variants from calling `delete`
to calling `destroy`. We don't need our own implementation any more.
This commit is contained in:
Maikel Linke
2019-01-25 17:17:52 +11:00
parent cdb49f88b0
commit b4d1e48693
2 changed files with 1 additions and 9 deletions

View File

@@ -105,14 +105,6 @@ Spree::Variant.class_eval do
OpenFoodNetwork::EnterpriseFeeCalculator.new(distributor, order_cycle).fees_by_type_for self
end
def delete
transaction do
self.update_column(:deleted_at, Time.zone.now)
ExchangeVariant.where(variant_id: self).destroy_all
self
end
end
def refresh_products_cache
if is_master?
product.refresh_products_cache

View File

@@ -6,7 +6,7 @@ class VariantDeleter
return false
end
variant.delete
variant.destroy
end
private