Class: ActiveRecord::Reflection::RuntimeReflection
Do not use. This class is for internal use only.
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
AbstractReflection
|
|
|
Instance Chain:
self,
AbstractReflection
|
|
| Inherits: |
ActiveRecord::Reflection::AbstractReflection
|
| Defined in: | activerecord/lib/active_record/reflection.rb |
Class Method Summary
Instance Attribute Summary
- #constraints readonly
- #join_foreign_key readonly
- #scope readonly
- #type readonly
AbstractReflection - Inherited
| #counter_must_be_updated_by_has_many?, | |
| #has_active_cached_counter? | Returns whether this association has a counter cache and its column values were backfilled (and so it is used internally by methods like |
| #has_cached_counter? | Returns whether this association has a counter cache. |
| #inverse_updates_counter_cache? | |
| #inverse_updates_counter_in_memory?, #strict_loading?, #through_reflection? | |
Instance Method Summary
AbstractReflection - Inherited
| #alias_candidate, | |
| #build_association | Returns a new, unsaved instance of the associated class. |
| #build_scope, #chain, #check_validity_of_inverse!, | |
| #class_name | Returns the class name for the macro. |
| #constraints, #counter_cache_column, #inverse_of, | |
| #inverse_which_updates_counter_cache | We need to avoid the following situation: |
| #join_scope, #join_scopes, #klass_join_scope, | |
| #scopes | Returns a list of scopes that should be applied for this |
| #strict_loading_violation_message, #table_name, | |
| #actual_source_reflection | FIXME: this is a horrible name. |
| #ensure_option_not_given_as_class!, #primary_key | |
Constructor Details
.new(reflection, association) ⇒ RuntimeReflection
# File 'activerecord/lib/active_record/reflection.rb', line 1300
def initialize(reflection, association) super() @reflection = reflection @association = association end
Instance Attribute Details
#constraints (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/reflection.rb', line 1298
delegate :scope, :type, :constraints, :join_foreign_key, to: :@reflection
#join_foreign_key (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/reflection.rb', line 1298
delegate :scope, :type, :constraints, :join_foreign_key, to: :@reflection
#scope (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/reflection.rb', line 1298
delegate :scope, :type, :constraints, :join_foreign_key, to: :@reflection
#type (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/reflection.rb', line 1298
delegate :scope, :type, :constraints, :join_foreign_key, to: :@reflection
Instance Method Details
#aliased_table
[ GitHub ]# File 'activerecord/lib/active_record/reflection.rb', line 1310
def aliased_table klass.arel_table end
#all_includes
[ GitHub ]# File 'activerecord/lib/active_record/reflection.rb', line 1318
def all_includes; yield; end
#join_primary_key(klass = self.klass)
[ GitHub ]#klass
[ GitHub ]# File 'activerecord/lib/active_record/reflection.rb', line 1306
def klass @association.klass end