# File lib/couchrest/core/database.rb, line 116 def delete_attachment(doc, name, force=false) uri = url_for_attachment(doc, name) # this needs a rev begin JSON.parse(HttpAbstraction.delete(uri)) rescue Exception => error if force # get over a 409 doc = get(doc['_id']) uri = url_for_attachment(doc, name) JSON.parse(HttpAbstraction.delete(uri)) else error end end end