def delete_attachment(doc, name, force=false)
      attach_path = path_for_attachment(doc, name)
      begin
        connection.delete(attach_path)
      rescue Exception => error
        if force
          # get over a 409
          doc = get(doc['_id'])
          attach_path = path_for_attachment(doc, name)
          connection.delete(attach_path)
        else
          error
        end
      end
    end
def delete_attachment(doc, name, force=false)
      attach_path = path_for_attachment(doc, name)
      begin
        connection.delete(attach_path)
      rescue Exception => error
        if force
          # get over a 409
          doc = get(doc['_id'])
          attach_path = path_for_attachment(doc, name)
          connection.delete(attach_path)
        else
          error
        end
      end
    end
DELETE an attachment directly from CouchDB