module ActiveRecord::Scoping::Default::ClassMethods

def default_scopes?(all_queries: false)

default_scopes for the model where +all_queries+ is true.
is set to true, the method will check if there are any
Checks if the model has any default scopes. If all_queries
def default_scopes?(all_queries: false)
  if all_queries
    self.default_scopes.any?(&:all_queries)
  else
    self.default_scopes.any?
  end
end