lib/makura/database.rb in makura-2010.08 vs lib/makura/database.rb in makura-2010.08.26
- old
+ new
@@ -161,10 +161,10 @@
# NOTE:
# * Seems like we don't even need to check _id, CouchDB will assign it.
# But in order to use our own uuids we still do it.
def bulk_docs(docs)
docs.each{|doc| doc['_id'] ||= @server.next_uuid }
- post("_bulk_docs", :payload => {:docs => docs})
+ post("_bulk_docs", :payload => {:docs => docs}, 'Content-Type' => 'application/json')
end
alias bulk_save bulk_docs
def get_attachment(doc, file_id)
doc_id = doc.respond_to?(:_id) ? doc._id : doc.to_str