Skip to content

Commit

Permalink
adds a remark about eager loading and gems
Browse files Browse the repository at this point in the history
References #77.
  • Loading branch information
fxn committed Sep 8, 2019
1 parent 8c4aadb commit 1b0d316
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ loader.setup
loader.eager_load # won't eager load the database adapters
```

In gems, the method needs to be invoked after the main namespace has been defined, as shown in [Synopsis](https://github.com/fxn/zeitwerk#synopsis).

Eager loading is synchronized and idempotent.

If you want to eager load yourself and all dependencies using Zeitwerk, you can broadcast the `eager_load` call to all instances:
Expand Down

0 comments on commit 1b0d316

Please sign in to comment.