Delete dead code Variant#default_price?

This commit is contained in:
Matt-Yorkley
2021-02-16 20:26:52 +00:00
parent 4213f66afb
commit 105f59d959
2 changed files with 1 additions and 5 deletions

View File

@@ -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

View File

@@ -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)