method
build_scope
v5.2.3 -
Show latest stable
- Class:
ActiveRecord::Associations::Builder::Association
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