class ActiveStorage::Blob

def purge_later

an Active Record callback, or in any other real-time scenario.
Enqueues an ActiveStorage::PurgeJob to call #purge. This is the recommended way to purge blobs from a transaction,
def purge_later
  ActiveStorage::PurgeJob.perform_later(self)
end