Class: ActiveRecord::Associations::AssociationScope
- Includes:
- JoinHelper
- Defined in:
- activerecord/lib/active_record/associations/association_scope.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#alias_tracker ⇒ Object
readonly
Returns the value of attribute alias_tracker.
-
#association ⇒ Object
readonly
Returns the value of attribute association.
Instance Method Summary collapse
-
#initialize(association) ⇒ AssociationScope
constructor
A new instance of AssociationScope.
- #scope ⇒ Object
Methods included from JoinHelper
Constructor Details
#initialize(association) ⇒ AssociationScope
Returns a new instance of AssociationScope.
11 12 13 14 |
# File 'activerecord/lib/active_record/associations/association_scope.rb', line 11 def initialize(association) @association = association @alias_tracker = AliasTracker.new klass.connection end |
Instance Attribute Details
#alias_tracker ⇒ Object (readonly)
Returns the value of attribute alias_tracker
6 7 8 |
# File 'activerecord/lib/active_record/associations/association_scope.rb', line 6 def alias_tracker @alias_tracker end |
#association ⇒ Object (readonly)
Returns the value of attribute association
6 7 8 |
# File 'activerecord/lib/active_record/associations/association_scope.rb', line 6 def association @association end |