Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
Add Comment
Please, Sign In to add comment