| It's more composable with multiple includes. For instance, if you have a simple active record type: class User
has_many :comments;
has_many :likes;
end User.includes(:comments, :likes).find(user_id) Generates 3 queries, but importantly the number of records returned is appropriate. User.joins(:comments, :likes).where(users: { id: user_id }) Generates only a single query, but the number of records returned from this join is the product of comments*likes for this particular user. I find the includes stuff easier to reason about as the amount of associations you need loaded in memory becomes more complex. |
Not "user has orders", and also "user has favorite products".