Method: Adrift::Integration::ActiveRecord#attachment
- Defined in:
- lib/adrift/integration/active_record.rb
#attachment ⇒ Object
Does everything Base#attachment does, but it also registers the callbacks to save the attachments when the model is saved, and to destroy them, when it is destroyed.
12 13 14 15 16 |
# File 'lib/adrift/integration/active_record.rb', line 12 def (*) super after_save :save_attachments before_destroy :destroy_attachments end |