2 points · by celestinogomes · 9y ago · 2 comments
There is one usecase where this works, though.
class Post < ActiveRecord::Base
default_scope { include(:author) }
end
In my case, the parent model depended on the child-model to be present when running a few methods (calculating the total for line items), so I decided to do this for eager loading.