What\'s the difference between \"includes\" and \"joins\" in ActiveRecord query? Can anyone explain to me with the following two associated
Joins will just join the tables and bringsselected fields in return. if you call associations on joins query result, it will fire database queries again
Include will eager load the included associations and add them in memory. Include loads all the included tables attributes. If you call associations on include query result, it wont fire any queries
You can find a detailed explanation with examples in this article of mine: Active Record Associations Tips & Tricks.