Class: ActiveStorage::Reflection::HasAttachedReflection
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
| 
         Subclasses: 
        
       | 
    |
| Super Chains via Extension / Inclusion / Inheritance | |
| 
         Class Chain: 
        
       | 
    |
| 
         Instance Chain: 
        
       | 
    |
| Inherits: | 
        ActiveRecord::Reflection::MacroReflection
        
  | 
    
| Defined in: | activestorage/lib/active_storage/reflection.rb | 
Class Method Summary
::ActiveRecord::Reflection::MacroReflection - Inherited
::ActiveRecord::Reflection::AbstractReflection - Inherited
Instance Attribute Summary
::ActiveRecord::Reflection::MacroReflection - Inherited
| #active_record, #autosave=, | |
| #name | Returns the name of the macro.  | 
    
| #options | Returns the hash of options used for the macro.  | 
    
| #scope, #plural_name | |
::ActiveRecord::Reflection::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
::ActiveRecord::Reflection::MacroReflection - Inherited
| #== | Returns   | 
    
| #compute_class, | |
| #klass | Returns the class for the macro.  | 
    
| #scope_for, #derive_class_name, #normalize_options, #_klass | |
::ActiveRecord::Reflection::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
This class inherits a constructor from ActiveRecord::Reflection::MacroReflection
Instance Method Details
#named_variants
[ GitHub ]# File 'activestorage/lib/active_storage/reflection.rb', line 10
def named_variants @named_variants ||= {} end
#variant(name, transformations)
[ GitHub ]# File 'activestorage/lib/active_storage/reflection.rb', line 6
def variant(name, transformations) named_variants[name] = NamedVariant.new(transformations) end