Method: ActiveStorage::Attached::One#attachment
- Defined in:
- activestorage/lib/active_storage/attached/one.rb
#attachment ⇒ Object
Returns the associated attachment record.
You don’t have to call this method to access the attachment’s methods as they are all available at the model level.
33 34 35 |
# File 'activestorage/lib/active_storage/attached/one.rb', line 33 def change.present? ? change. : record.public_send("#{name}_attachment") end |