Maybe you are already familiar with includes or preload, but you know
that a lot of the time you will need more than just preload(:comments).
It is common to have complex nested associations, scopes that you need or want
to reuse, places where preloading all the associated records could hurt the
performance of your app.
How do you work with complex nested associations?… How do you simplify the
preloading of those nested associations?… How do you “preload an scope”?…
How do you preload just the latest n of each record?
#Backend#Ruby on Rails
Added: 6 Oct 2021