class ActiveStorage::Attached::Changes::DetachOne

def detach

def detach
  if attachment.present?
    attachment.delete
    reset
  end
end