mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-17 00:07:24 +00:00
Delete dead code Variant#default_price?
This commit is contained in:
@@ -67,7 +67,7 @@ module Spree
|
||||
has_many :stock_items, through: :variants
|
||||
|
||||
delegate_belongs_to :master, :sku, :price, :currency, :display_amount, :display_price, :weight,
|
||||
:height, :width, :depth, :is_master, :default_price?, :cost_currency,
|
||||
:height, :width, :depth, :is_master, :cost_currency,
|
||||
:price_in, :amount_in, :unit_value, :unit_description
|
||||
delegate :images_attributes=, :display_as=, to: :master
|
||||
|
||||
|
||||
@@ -211,10 +211,6 @@ module Spree
|
||||
option_values.detect { |o| o.option_type.name == opt_name }.try(:presentation)
|
||||
end
|
||||
|
||||
def default_price?
|
||||
!default_price.nil?
|
||||
end
|
||||
|
||||
def price_in(currency)
|
||||
prices.select{ |price| price.currency == currency }.first ||
|
||||
Spree::Price.new(variant_id: id, currency: currency)
|
||||
|
||||
Reference in New Issue
Block a user