
Don’t use default_scope. Ever - celestinogomes
https://andycroll.com/ruby/dont-use-default-scope/
======
amingilani
I ran into this recently. Almost the exact same usecase, although I had
canceled line items, instead of posts.

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.

------
celestinogomes
IMO, only to set up a non-ID sort order

