Remove #deleted? method from Product and Variant

This method is already supplied via the paranoia gem, there's no need to re-implement it here.
This commit is contained in:
Matt-Yorkley
2021-05-01 12:54:33 +01:00
parent 8672969798
commit 7948c5943d
2 changed files with 0 additions and 14 deletions

View File

@@ -266,13 +266,6 @@ module Spree
duplicator.duplicate
end
# use deleted? rather than checking the attribute directly. this
# allows extensions to override deleted? if they want to provide
# their own definition.
def deleted?
!!deleted_at
end
# split variants list into hash which shows mapping of opt value onto matching variants
# eg categorise_variants_from_option(color) => {"red" -> [...], "blue" -> [...]}
def categorise_variants_from_option(opt_type)

View File

@@ -166,13 +166,6 @@ module Spree
OpenFoodNetwork::EnterpriseFeeCalculator.new(distributor, order_cycle).fees_by_type_for self
end
# use deleted? rather than checking the attribute directly. this
# allows extensions to override deleted? if they want to provide
# their own definition.
def deleted?
deleted_at
end
def option_value(opt_name)
option_values.detect { |o| o.option_type.name == opt_name }.try(:presentation)
end