Class: ActiveRecord::Reflection::RuntimeReflection
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
#get_join_keys, #join_scopes, #plural_name, #scope, #scopes, #type
#build_association, #chain, #check_validity_of_inverse!, #class_name, #counter_cache_column, #counter_must_be_updated_by_has_many?, #get_join_keys, #has_cached_counter?, #inverse_of, #inverse_updates_counter_in_memory?, #inverse_which_updates_counter_cache, #join_keys, #join_scopes, #klass_join_scope, #primary_key_type, #quoted_table_name, #scope_chain, #scopes, #through_reflection?
Constructor Details
#initialize(reflection, association) ⇒ RuntimeReflection
Returns a new instance of RuntimeReflection.
1082
1083
1084
1085
|
# File 'lib/active_record/reflection.rb', line 1082
def initialize(reflection, association)
@reflection = reflection
@association = association
end
|
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next.
1080
1081
1082
|
# File 'lib/active_record/reflection.rb', line 1080
def next
@next
end
|
Instance Method Details
#alias_candidate(name) ⇒ Object
1103
1104
1105
|
# File 'lib/active_record/reflection.rb', line 1103
def alias_candidate(name)
"#{plural_name}_#{name}_join"
end
|
#alias_name ⇒ Object
1107
1108
1109
|
# File 'lib/active_record/reflection.rb', line 1107
def alias_name
Arel::Table.new(table_name, type_caster: klass.type_caster)
end
|
#all_includes ⇒ Object
1111
|
# File 'lib/active_record/reflection.rb', line 1111
def all_includes; yield; end
|
#constraints ⇒ Object
1095
1096
1097
|
# File 'lib/active_record/reflection.rb', line 1095
def constraints
@reflection.constraints
end
|
#klass ⇒ Object
1087
1088
1089
|
# File 'lib/active_record/reflection.rb', line 1087
def klass
@association.klass
end
|
#source_type_info ⇒ Object
1099
1100
1101
|
# File 'lib/active_record/reflection.rb', line 1099
def source_type_info
@reflection.source_type_info
end
|
#table_name ⇒ Object
1091
1092
1093
|
# File 'lib/active_record/reflection.rb', line 1091
def table_name
klass.table_name
end
|