solidusio-contrib / solidus_sale_prices

Completely based on spree_sale_prices
BSD 3-Clause "New" or "Revised" License
10 stars 29 forks source link

Refactor some code to remove warnings #46

Open softr8 opened 4 years ago

softr8 commented 4 years ago

price_in

Spree::Price#price_in will be removed from Solidus 3.0, and variant_decorator uses it throwing the following warning:

DEPRECATION WARNING: price_in is deprecated and will be removed from Solidus 3.0 (use price_for instead) (called from active_sale_in at /.../solidus_sale_prices/app/decorators/models/solidus_sale_prices/spree/variant_decorator.rb:26)

Price_on requires pricing options, not sure how to get the params required, maybe:

def active_sale_in(currency)
  price_for(Spree::Config.pricing_options_class.new(currency: currency))
end

discard

Spree::Price.with_deleted has been deprecated. Use Spree::Price.with_discarded instead. app/models/spree/sale_price.rb:6

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.