this may fix the attachment erase problem on couchview

This commit is contained in:
Chris Anderson 2008-09-13 23:54:39 -04:00
parent 26d50c8ac1
commit 2082c491fa

View file

@ -206,7 +206,7 @@ module CouchRest
existing = @db.get(id) rescue nil existing = @db.get(id) rescue nil
if existing if existing
updated = fields.merge({"_id" => id, "_rev" => existing["_rev"]}) updated = existing.merge(fields)
if existing != updated if existing != updated
say "replacing #{id}" say "replacing #{id}"
db.save(updated) db.save(updated)