Created
May 20, 2019 21:07
-
-
Save Prorok64b/0de2a38794194d7ae6c8f623c597af91 to your computer and use it in GitHub Desktop.
first relation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User.includes(:posts) | |
# produces: | |
# SELECT * FROM users | |
# SELECT * FROM posts WHERE posts.user_id IN (...users ids) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment