got view queries happening correctly

This commit is contained in:
Chris Anderson 2008-11-21 16:21:20 -08:00
parent 32ffbfe019
commit 19a70ffd7d
7 changed files with 106 additions and 60 deletions

View file

@ -144,6 +144,8 @@ module CouchRest
# DELETE the document from CouchDB that has the given <tt>_id</tt> and
# <tt>_rev</tt>.
def delete doc
raise ArgumentError, "_id and _rev required for deleting" unless doc['_id'] && doc['_rev']
slug = CGI.escape(doc['_id'])
CouchRest.delete "#{@root}/#{slug}?rev=#{doc['_rev']}"
end