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
1080
1081
1082
1083
|
# File 'lib/active_record/reflection.rb', line 1080
def initialize(reflection, association)
@reflection = reflection
@association = association
end
|
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next.
1078
1079
1080
|
# File 'lib/active_record/reflection.rb', line 1078
def next
@next
end
|
Instance Method Details
#alias_candidate(name) ⇒ Object
1101
1102
1103
|
# File 'lib/active_record/reflection.rb', line 1101
def alias_candidate(name)
"#{plural_name}_#{name}_join"
end
|
#alias_name ⇒ Object
1105
1106
1107
|
# File 'lib/active_record/reflection.rb', line 1105
def alias_name
Arel::Table.new(table_name, type_caster: klass.type_caster)
end
|
#all_includes ⇒ Object
1109
|
# File 'lib/active_record/reflection.rb', line 1109
def all_includes; yield; end
|
#constraints ⇒ Object
1093
1094
1095
|
# File 'lib/active_record/reflection.rb', line 1093
def constraints
@reflection.constraints
end
|
#klass ⇒ Object
1085
1086
1087
|
# File 'lib/active_record/reflection.rb', line 1085
def klass
@association.klass
end
|
#source_type_info ⇒ Object
1097
1098
1099
|
# File 'lib/active_record/reflection.rb', line 1097
def source_type_info
@reflection.source_type_info
end
|
#table_name ⇒ Object
1089
1090
1091
|
# File 'lib/active_record/reflection.rb', line 1089
def table_name
klass.table_name
end
|