Making sense of ActiveRecord joins, includes, preload, and eager_load
Like a pair of jumper cables, ActiveRecord’s joins
, includes
, preload
, and eager_load
methods are incredibly useful, but also very dangerous when used incorrectly. Knowing when and where to use each approach - and even when to combine them - can save you considerable trouble as your app grows.
Post a comment