Module: ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods
- Defined in:
- activestorage/lib/active_storage/reflection.rb
Instance Method Summary collapse
-
#reflect_on_all_attachments ⇒ Object
Returns an array of reflection objects for all the attachments in the class.
-
#reflect_on_attachment(attachment) ⇒ Object
Returns the reflection object for the named
attachment
.
Instance Method Details
#reflect_on_all_attachments ⇒ Object
Returns an array of reflection objects for all the attachments in the class.
59 60 61 |
# File 'activestorage/lib/active_storage/reflection.rb', line 59 def .values end |
#reflect_on_attachment(attachment) ⇒ Object
Returns the reflection object for the named attachment
.
User.(:avatar)
# => the avatar reflection
68 69 70 |
# File 'activestorage/lib/active_storage/reflection.rb', line 68 def () [.to_s] end |