Hi
I need to eager_load multiple polymorphic nested associations
I’m trying to re-create a behavior like
ActiveRecord::Associations::Preloader.new.preload(@users, :company)
https://apidock.com/rails/ActiveRecord/Associations/Preloader/preload
So I’m loading multiple models and trying to population associations manually, not sure how to assign the belongs_to
record properly ?
(I want to avoid any side effect like a DB query when article.author = author
on a has_one
association)
and preferably in rails 4