Module: ActiveShrine::Reflection::ActiveRecordExtensions::ClassMethods
- Defined in:
- lib/active_shrine/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
. - #shrine_attachment_reflections ⇒ Object
Instance Method Details
#reflect_on_all_attachments ⇒ Object
Returns an array of reflection objects for all the attachments in the class.
60 61 62 |
# File 'lib/active_shrine/reflection.rb', line 60 def .values end |
#reflect_on_attachment(attachment) ⇒ Object
Returns the reflection object for the named attachment
.
User.(:avatar)
# => the avatar reflection
69 70 71 |
# File 'lib/active_shrine/reflection.rb', line 69 def () [.to_s] end |
#shrine_attachment_reflections ⇒ Object
54 55 56 |
# File 'lib/active_shrine/reflection.rb', line 54 def @shrine_attachment_reflections ||= {} end |