Class: ActiveRecord::Reflection::RuntimeReflection

Inherits:
AbstractReflection show all
Defined in:
lib/active_record/reflection.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from AbstractReflection

#alias_candidate, #build_association, #build_scope, #chain, #check_validity_of_inverse!, #class_name, #constraints, #counter_cache_column, #counter_must_be_updated_by_has_many?, #has_cached_counter?, #inverse_of, #inverse_updates_counter_in_memory?, #inverse_which_updates_counter_cache, #join_scope, #join_scopes, #klass_join_scope, #scopes, #strict_loading?, #table_name, #through_reflection?

Constructor Details

#initialize(reflection, association) ⇒ RuntimeReflection

Returns a new instance of RuntimeReflection.



1036
1037
1038
1039
# File 'lib/active_record/reflection.rb', line 1036

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

Instance Method Details

#aliased_tableObject



1045
1046
1047
# File 'lib/active_record/reflection.rb', line 1045

def aliased_table
  klass.arel_table
end

#all_includesObject



1053
# File 'lib/active_record/reflection.rb', line 1053

def all_includes; yield; end

#join_primary_key(klass = self.klass) ⇒ Object



1049
1050
1051
# File 'lib/active_record/reflection.rb', line 1049

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

#klassObject



1041
1042
1043
# File 'lib/active_record/reflection.rb', line 1041

def klass
  @association.klass
end