class ActiveStorage::Attached::One

def purge

attachment and deletes the file on the service).
Directly purges the attachment (i.e. destroys the blob and
def purge
  if attached?
    attachment.purge
    write_attachment nil
  end
end