diff --git a/config/initializers/money.rb b/config/initializers/money.rb index edf7bce635..13e1e8911b 100644 --- a/config/initializers/money.rb +++ b/config/initializers/money.rb @@ -1,3 +1,12 @@ +# This MoneyRails::ActionViewExtension module should get loaded +# automatically when ActionView is loaded, but *very* rarely when +# setting up the app locally ItemHelper is loaded beforehand, +# which depends on MoneyRails::ActionViewExtension, so without +# this line an uninitialized constant error is raised. +# +# See: https://github.com/RubyMoney/money-rails/issues/614 +require "money-rails/helpers/action_view_extension" + MoneyRails.configure do |config| # set the default currency config.default_currency = :usd