Skip to content

Commit 8f8d685

Browse files
authored
Fix unitialized money_rails constant error (#4851)
* Fix unitialized money_rails constant error * Fix require statement file_path and edit comment
1 parent 9811a97 commit 8f8d685

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

config/initializers/money.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# This MoneyRails::ActionViewExtension module should get loaded
2+
# automatically when ActionView is loaded, but *very* rarely when
3+
# setting up the app locally ItemHelper is loaded beforehand,
4+
# which depends on MoneyRails::ActionViewExtension, so without
5+
# this line an uninitialized constant error is raised.
6+
#
7+
# See: https://github.com/RubyMoney/money-rails/issues/614
8+
require "money-rails/helpers/action_view_extension"
9+
110
MoneyRails.configure do |config|
211
# set the default currency
312
config.default_currency = :usd

0 commit comments

Comments
 (0)