mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
10 lines
185 B
Ruby
10 lines
185 B
Ruby
# frozen_string_literal: true
|
|
|
|
class ExchangeVariantDeleter
|
|
def delete(product)
|
|
ExchangeVariant.
|
|
where(variant_id: product.variants.select(:id)).
|
|
delete_all
|
|
end
|
|
end
|