Merge pull request #7527 from Matt-Yorkley/dead-code-deleted

Remove #deleted? method from Product and Variant
This commit is contained in:
Andy Brett
2021-05-05 08:07:39 -07:00
committed by GitHub
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