method
eval_scope
v5.1.7 -
Show latest stable
- Class:
ActiveRecord::Associations::AssociationScope
eval_scope(klass, table, scope, owner)private
No documentation available.
# File activerecord/lib/active_record/associations/association_scope.rb, line 174
def eval_scope(klass, table, scope, owner)
predicate_builder = PredicateBuilder.new(TableMetadata.new(klass, table))
ActiveRecord::Relation.create(klass, table, predicate_builder).instance_exec(owner, &scope)
end