aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-07-19 20:26:40 -0400
committerGeorge Claghorn <george@basecamp.com>2018-07-19 20:26:40 -0400
commit07ecaa614b127a1a0b319c5f8eab3d6cad630ddc (patch)
tree0e87559fd7b9b54eb3fab64fc73372fba9926a6a /activestorage/app
parent01429a665c1eadd20a64ca25d36190a9d9b555b1 (diff)
downloadrails-07ecaa614b127a1a0b319c5f8eab3d6cad630ddc.tar.gz
rails-07ecaa614b127a1a0b319c5f8eab3d6cad630ddc.tar.bz2
rails-07ecaa614b127a1a0b319c5f8eab3d6cad630ddc.zip
Destroy blob record before deleting stored data
Diffstat (limited to 'activestorage/app')
-rw-r--r--activestorage/app/models/active_storage/blob.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/app/models/active_storage/blob.rb b/activestorage/app/models/active_storage/blob.rb
index b72f2e796d..bf87598a66 100644
--- a/activestorage/app/models/active_storage/blob.rb
+++ b/activestorage/app/models/active_storage/blob.rb
@@ -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,