method
scope
v4.1.8 -
Show latest stable
- Class:
ActiveRecord::Associations::AssociationScope
scope(association, connection)public
No documentation available.
# File activerecord/lib/active_record/associations/association_scope.rb, line 10
def scope(association, connection)
klass = association.klass
reflection = association.reflection
scope = klass.unscoped
owner = association.owner
alias_tracker = AliasTracker.empty connection
scope.extending! Array(reflection.options[:extend])
add_constraints(scope, owner, klass, reflection, alias_tracker)
end