method

build_scope

build_scope()
private

No documentation available.

# File activerecord/lib/active_record/associations/preloader/association.rb, line 119
          def build_scope
            scope = klass.scope_for_association

            if reflection.type && !reflection.through_reflection?
              scope.where!(reflection.type => model.polymorphic_name)
            end

            scope.merge!(reflection_scope) if reflection.scope
            scope.merge!(preload_scope) if preload_scope
            scope
          end