detach()
Deletes the attachment without purging it, leaving its blob in place.
# File activestorage/lib/active_storage/attached/one.rb, line 48 def detach if attached? attachment.destroy write_attachment nil end end