Update Spree::Money to use Monetize#parse instead of Money#parse

This method was removed from the money gem without replacement. It's now provided by the monetize gem.
This commit is contained in:
Matt-Yorkley
2021-01-06 19:18:58 +00:00
parent 3387bf5821
commit cc88611b15

View File

@@ -9,7 +9,7 @@ module Spree
delegate :cents, to: :money
def initialize(amount, options = {})
@money = ::Money.parse([amount, (options[:currency] || Spree::Config[:currency])].join)
@money = ::Monetize.parse([amount, (options[:currency] || Spree::Config[:currency])].join)
@options = {}
@options[:with_currency] = Spree::Config[:display_currency]
@options[:symbol_position] = Spree::Config[:currency_symbol_position].to_sym