Class: ActiveRecord::Associations::AssociationScope
- Defined in:
- activerecord/lib/active_record/associations/association_scope.rb
Overview
:nodoc:
Constant Summary collapse
- INSTANCE =
new
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
Instance Method Details
#join_type ⇒ Object
21 22 23 |
# File 'activerecord/lib/active_record/associations/association_scope.rb', line 21 def join_type Arel::Nodes::InnerJoin end |
#scope(association, connection) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# 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.[:extend]) add_constraints(scope, owner, klass, reflection, alias_tracker) end |