Skip to content

Instantly share code, notes, and snippets.

@AntelopeSalad
Created January 20, 2014 21:14
Show Gist options
  • Save AntelopeSalad/8529317 to your computer and use it in GitHub Desktop.
Save AntelopeSalad/8529317 to your computer and use it in GitHub Desktop.
posts = Post.includes(:users)
# SELECT `posts`.* FROM `posts`
# SELECT `users`.* FROM `users` WHERE `users`.`id` IN (1, 2, 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment