module ActiveRecord::Scoping::Default::ClassMethods
def evaluate_default_scope
situation where a default scope references a scope which has a default
The ignore_default_scope flag is used to prevent an infinite recursion
def evaluate_default_scope return if ignore_default_scope? begin self.ignore_default_scope = true yield ensure self.ignore_default_scope = false end end