method

build_scope

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: Association
build_scope(scope, extension) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations/builder/association.rb, line 51
    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
Register or log in to add new notes.