Skip to content

Instantly share code, notes, and snippets.

@tdm00
Created October 1, 2012 19:57
Show Gist options
  • Select an option

  • Save tdm00/3814065 to your computer and use it in GitHub Desktop.

Select an option

Save tdm00/3814065 to your computer and use it in GitHub Desktop.
# Based on
# http://guides.rubyonrails.org/active_record_querying.html#eager-loading-multiple-associations
# This works
Post.includes(:category, :comments => [:user])
# This does not work
Post.includes(:comments => [:user], :category)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment