method
wrap_scope
v4.2.7 -
Show latest stable
- Class:
ActiveRecord::Associations::Builder::CollectionAssociation
wrap_scope(scope, mod)private
No documentation available.
# 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