Created
January 2, 2010 03:25
-
-
Save joshfrench/267367 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Author.find :all, :joins => 'inner join extensions on extensions.author_id = authors.id', :group => 'authors.id' | |
# Had to add the :group key to produce a unique set. | |
# Removing `:include => :extensions` also reduced this from two queries to one. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment