lib/money/railtie.rb in shopify-money-1.0.1.pre vs lib/money/railtie.rb in shopify-money-1.0.2.pre
- old
+ new
@@ -6,7 +6,14 @@
ActiveSupport.on_load :active_job do
require_relative "rails/job_argument_serializer"
ActiveJob::Serializers.add_serializers ::Money::Rails::JobArgumentSerializer
end
end
+
+ initializer "shopify-money.setup_locale_aware_parser" do
+ ActiveSupport.on_load(:action_view) do
+ Money::Parser::LocaleAware.decimal_separator_resolver =
+ -> { ::I18n.translate("number.currency.format.separator") }
+ end
+ end
end
end