mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user