Class: ActiveRecord::Reflection::RuntimeReflection
- Inherits:
-
AbstractReflection
- Object
- AbstractReflection
- ActiveRecord::Reflection::RuntimeReflection
- Defined in:
- lib/active_record/reflection.rb
Overview
:nodoc:
Instance Method Summary collapse
- #aliased_table ⇒ Object
- #all_includes ⇒ Object
-
#initialize(reflection, association) ⇒ RuntimeReflection
constructor
A new instance of RuntimeReflection.
- #klass ⇒ Object
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?, #get_join_keys, #has_cached_counter?, #inverse_of, #inverse_updates_counter_in_memory?, #inverse_which_updates_counter_cache, #join_foreign_key, #join_keys, #join_primary_key, #join_scope, #join_scopes, #klass_join_scope, #scopes, #table_name, #through_reflection?
Constructor Details
#initialize(reflection, association) ⇒ RuntimeReflection
Returns a new instance of RuntimeReflection.
1026 1027 1028 1029 |
# File 'lib/active_record/reflection.rb', line 1026 def initialize(reflection, association) @reflection = reflection @association = association end |
Instance Method Details
#aliased_table ⇒ Object
1035 1036 1037 |
# File 'lib/active_record/reflection.rb', line 1035 def aliased_table @aliased_table ||= Arel::Table.new(table_name, type_caster: klass.type_caster) end |
#all_includes ⇒ Object
1039 |
# File 'lib/active_record/reflection.rb', line 1039 def all_includes; yield; end |
#klass ⇒ Object
1031 1032 1033 |
# File 'lib/active_record/reflection.rb', line 1031 def klass @association.klass end |