Skip to content

Commit 8f962de

Browse files
Add N plus one operation solution section to README (#392)
1 parent b483791 commit 8f962de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
- [Using Entities](#using-entities)
3434
- [Entity Organization](#entity-organization)
3535
- [Caveats](#caveats)
36+
- [Preloading Associations](#preloading-associations)
3637
- [Installation](#installation)
3738
- [Testing with Entities](#testing-with-entities)
3839
- [Project Resources](#project-resources)
@@ -674,6 +675,10 @@ end
674675

675676
Also note that an `ArgumentError` is raised when unknown options are passed to either `expose` or `with_options`.
676677

678+
### Preloading Associations
679+
680+
Use [Grape::Entity::Preloader](https://github.com/OuYangJinTing/grape-entity-preloader) to preload associations and callbacks and avoid N+1 operations.
681+
677682
## Installation
678683

679684
Add this line to your application's Gemfile:

0 commit comments

Comments
 (0)