method

wrap_scope

Importance_0
v4.2.9 - Show latest stable - 0 notes - Class: CollectionAssociation
wrap_scope(scope, mod) private

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/collection_association.rb, line 83
    def wrap_scope(scope, mod)
      if scope
        if scope.arity > 0
          proc { |owner| instance_exec(owner, &scope).extending(mod) }
        else
          proc { instance_exec(&scope).extending(mod) }
        end
      else
        proc { extending(mod) }
      end
    end
Register or log in to add new notes.