First page Back Continue Last page Overview Text


Sequel allows you to eagerly load custom associations, giving you complete control over the eager loading process.

Eager loading custom associations is done with the eager_loader option, which takes a proc that accepts 3 arguments, a key hash, an array of current objects, and the dependent associations to eagerly load.

Obviously this is a lot of code to absorb all at once, but I'm going to break it down piece by piece, and hopefully show that it is fairly straightforward.