123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::Reflection::RuntimeReflection

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: ActiveRecord::Reflection::AbstractReflection
Defined in: activerecord/lib/active_record/reflection.rb

Class Method Summary

Instance Attribute Summary

AbstractReflection - Inherited

#counter_must_be_updated_by_has_many?,
#has_active_cached_counter?

Returns whether this association has a counter cache and its column values were backfilled (and so it is used internally by methods like size/any?/etc).

#has_cached_counter?

Returns whether this association has a counter cache.

#inverse_updates_counter_cache?
#inverse_updates_counter_in_memory?, #strict_loading?, #through_reflection?

Instance Method Summary

Constructor Details

.new(reflection, association) ⇒ RuntimeReflection

[ GitHub ]

  
# File 'activerecord/lib/active_record/reflection.rb', line 1248

def initialize(reflection, association)
  super()
  @reflection = reflection
  @association = association
end

Instance Attribute Details

#constraints (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/reflection.rb', line 1246

delegate :scope, :type, :constraints, :join_foreign_key, to: :@reflection

#join_foreign_key (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/reflection.rb', line 1246

delegate :scope, :type, :constraints, :join_foreign_key, to: :@reflection

#scope (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/reflection.rb', line 1246

delegate :scope, :type, :constraints, :join_foreign_key, to: :@reflection

#type (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/reflection.rb', line 1246

delegate :scope, :type, :constraints, :join_foreign_key, to: :@reflection

Instance Method Details

#aliased_table

[ GitHub ]

  
# File 'activerecord/lib/active_record/reflection.rb', line 1258

def aliased_table
  klass.arel_table
end

#all_includes

[ GitHub ]

  
# File 'activerecord/lib/active_record/reflection.rb', line 1266

def all_includes; yield; end

#join_primary_key(klass = self.klass)

[ GitHub ]

  
# File 'activerecord/lib/active_record/reflection.rb', line 1262

def join_primary_key(klass = self.klass)
  @reflection.join_primary_key(klass)
end

#klass

[ GitHub ]

  
# File 'activerecord/lib/active_record/reflection.rb', line 1254

def klass
  @association.klass
end