DSL to eager load delegated type class instances

https://github.com/adammiribyan/rails/commit/b1b8f9008840793fa34e228eb1a194a0a200985f

A nice DSL to avoid N+1 queries when iterating over a collection of entries and calling its entryable within the block, e.g.

Entry.with_entryables.messages.each do |entry|
  message.content
end
1 Like

Awesome! I love you followed the same logic as active storage :metal:t4:

1 Like