Module: Paperclip::PermanentRecords::ActiveRecord
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/paperclip/permanent_records/active_record.rb
Instance Method Summary collapse
Instance Method Details
#destroy(force = nil) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/paperclip/permanent_records/active_record.rb', line 8 def destroy(force = nil) if && # only when we have paperclip attachments, (!is_permanent? || # if model does not support "safe deletion" ::PermanentRecords.should_force_destroy?(force)) # or if model supports "safe deletion" but it is forced # => delete the attachments end super end |