method

build_scope

build_scope(scope, extension)
public

No documentation available.

# File activerecord/lib/active_record/associations/builder/association.rb, line 48
    def self.build_scope(scope, extension)
      new_scope = scope

      if scope && scope.arity == 0
        new_scope = proc { instance_exec(&scope) }
      end

      if extension
        new_scope = wrap_scope new_scope, extension
      end

      new_scope
    end