module ActiveRecord::Scoping::Default::ClassMethods
def execute_scope?(all_queries, default_scope_obj)
all_queries set, then execute on all queries; select, insert, update,
If all_queries is true, check if the default_scope object has
If all_queries is nil, only execute on select and insert queries.
def execute_scope?(all_queries, default_scope_obj) all_queries.nil? || all_queries && default_scope_obj.all_queries end