Guest User

Untitled

a guest
Apr 27th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. Author.find :all, :joins => 'inner join extensions on extensions.author_id = authors.id', :group => 'authors.id'
  2.  
  3. # Had to add the :group key to produce a unique set.
  4. # Removing `:include => :extensions` also reduced this from two queries to one.
Add Comment
Please, Sign In to add comment