How to populate a `belongs_to` after a manual eager loading (preferably in rails 4)


I need to eager_load multiple polymorphic nested associations

I’m trying to re-create a behavior like, :company)

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 = author on a has_one association)

and preferably in rails 4