Method: ActiveStorage::Attachment#purge_later
- Defined in:
- activestorage/app/models/active_storage/attachment.rb
#purge_later ⇒ Object
Deletes the attachment and enqueues a background job to purge the blob.
60 61 62 63 64 65 66 |
# File 'activestorage/app/models/active_storage/attachment.rb', line 60 def purge_later transaction do delete record.touch if record&.persisted? end blob&.purge_later end |