Author:
Source
I encourage you to stop using the Ruby on Rails built-in solution for resolving the N+1 problem and switch to automatic preloading. Are you surprised it’s possible? Check it by yourself: https://evgeniydemin.medium.com/automatic-preloading-in-rails-the-dream-that-came-true-80ed4982ce2d