Class: ActiveStorage::Reflection::HasAttachedReflection
- Inherits:
-
ActiveRecord::Reflection::MacroReflection
- Object
- ActiveRecord::Reflection::AbstractReflection
- ActiveRecord::Reflection::MacroReflection
- ActiveStorage::Reflection::HasAttachedReflection
- Defined in:
- activestorage/lib/active_storage/reflection.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from ActiveRecord::Reflection::MacroReflection
#active_record, #name, #options, #plural_name, #scope
Instance Method Summary collapse
Methods inherited from ActiveRecord::Reflection::MacroReflection
#==, #autosave=, #compute_class, #initialize, #klass, #scope_for
Methods inherited from ActiveRecord::Reflection::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?, #has_cached_counter?, #initialize, #inverse_of, #inverse_updates_counter_in_memory?, #inverse_which_updates_counter_cache, #join_scope, #join_scopes, #klass_join_scope, #scopes, #strict_loading?, #strict_loading_violation_message, #table_name, #through_reflection?
Constructor Details
This class inherits a constructor from ActiveRecord::Reflection::MacroReflection
Instance Method Details
#variant(name, transformations) ⇒ Object
6 7 8 |
# File 'activestorage/lib/active_storage/reflection.rb', line 6 def variant(name, transformations) variants[name] = transformations end |
#variants ⇒ Object
10 11 12 |
# File 'activestorage/lib/active_storage/reflection.rb', line 10 def variants @variants ||= {} end |