Skip to content

Commit 0cb70c1

Browse files
kholbekjsunny
andauthored
Linebreaks
Co-authored-by: Sunny Ripert <[email protected]>
1 parent 4517977 commit 0cb70c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,9 @@ MoneyRails.configure do |config|
276276
config.default_currency = -> { Tenant.current.default_currency }
277277
end
278278
```
279-
Be aware that this **does not work in Rails 7+**, as the lamda is evaluated immediately, and therefore requires your model to be loaded already.
279+
280+
Be aware that this **does not work in Rails 7+**, as the lambda is evaluated
281+
immediately, and therefore requires your model to be already loaded.
280282
Workarounds include wrapping the initialization in `ActiveSupport::Reloader.to_prepare`, or creating a function that rescues unloaded constants with an initialization-time default, and running that in your lambda.
281283

282284
In many cases this is not enough, so there are some other options to

0 commit comments

Comments
 (0)