Class: ActiveRecord::Reflection::RuntimeReflection
Overview
Instance Attribute Summary collapse
#delegate_reflection
Instance Method Summary
collapse
#join_keys, #plural_name, #scope, #type
#add_as_polymorphic_through, #add_as_source, #add_as_through, #association_primary_key, #check_validity!, #clear_association_scope_cache, #collect_join_chain, #collect_join_reflections, #has_scope?, #join_id_for, #join_keys, #nested?, #scope_chain, #source_options, #source_reflection, #source_reflection_name, #source_reflection_names, #through_options, #through_reflection, #through_reflection?
#build_association, #chain, #check_validity_of_inverse!, #class_name, #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_keys, #primary_key_type, #quoted_table_name, #through_reflection?
Constructor Details
#initialize(reflection, association) ⇒ RuntimeReflection
Returns a new instance of RuntimeReflection.
1028
1029
1030
1031
|
# File 'lib/active_record/reflection.rb', line 1028
def initialize(reflection, association)
@reflection = reflection
@association = association
end
|
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next.
1026
1027
1028
|
# File 'lib/active_record/reflection.rb', line 1026
def next
@next
end
|
Instance Method Details
#alias_candidate(name) ⇒ Object
1049
1050
1051
|
# File 'lib/active_record/reflection.rb', line 1049
def alias_candidate(name)
"#{plural_name}_#{name}_join"
end
|
#alias_name ⇒ Object
1053
1054
1055
|
# File 'lib/active_record/reflection.rb', line 1053
def alias_name
Arel::Table.new(table_name)
end
|
#all_includes ⇒ Object
1057
|
# File 'lib/active_record/reflection.rb', line 1057
def all_includes; yield; end
|
#constraints ⇒ Object
1041
1042
1043
|
# File 'lib/active_record/reflection.rb', line 1041
def constraints
@reflection.constraints
end
|
#klass ⇒ Object
1033
1034
1035
|
# File 'lib/active_record/reflection.rb', line 1033
def klass
@association.klass
end
|
#source_type_info ⇒ Object
1045
1046
1047
|
# File 'lib/active_record/reflection.rb', line 1045
def source_type_info
@reflection.source_type_info
end
|
#table_name ⇒ Object
1037
1038
1039
|
# File 'lib/active_record/reflection.rb', line 1037
def table_name
klass.table_name
end
|