1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Destroy blob record before deleting stored data

This commit is contained in:
George Claghorn 2018-07-19 20:26:40 -04:00
parent 01429a665c
commit 07ecaa614b

View file

@ -205,8 +205,8 @@ class ActiveStorage::Blob < ActiveRecord::Base
# blobs. Note, though, that deleting the file off the service will initiate a HTTP connection to the service, which may
# be slow or prevented, so you should not use this method inside a transaction or in callbacks. Use #purge_later instead.
def purge
delete
destroy
delete
end
# Enqueues an ActiveStorage::PurgeJob to call #purge. This is the recommended way to purge blobs from a transaction,