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

Clarify the ActiveStorage::Attachment#purge and #purge_later docs

Link to the corresponding ActiveStorage::Blob methods, whose docs more accurately describe their effects. [ci skip]
This commit is contained in:
George Claghorn 2018-07-18 21:56:36 -04:00
parent 08813dd62a
commit ac6e6c6b99

View file

@ -17,13 +17,13 @@ class ActiveStorage::Attachment < ActiveRecord::Base
after_create_commit :analyze_blob_later, :identify_blob after_create_commit :analyze_blob_later, :identify_blob
after_destroy_commit :purge_dependent_blob_later after_destroy_commit :purge_dependent_blob_later
# Synchronously purges the blob (deletes it from the configured service) and deletes the attachment. # Synchronously deletes the attachment and {purges the blob}[rdoc-ref:ActiveStorage::Blob#purge].
def purge def purge
blob.purge blob.purge
delete delete
end end
# Deletes the attachment and queues a background job to purge the blob (delete it from the configured service). # Deletes the attachment and {enqueues a background job}[rdoc-ref:ActiveStorage::Blob#purge_later] to purge the blob.
def purge_later def purge_later
blob.purge_later blob.purge_later
delete delete