Save on Document & ExtendedDocument crashed if bulk

- document#save expects to receive {"ok" => true} even with bulk mode
- ExtendedDocument#save_without_callbacks reverted to previous code
  (expecting result["ok"] as in create_without_callbacks)
This commit is contained in:
Julien Sanchez 2009-10-12 19:55:02 +08:00 committed by Matt Aimonetti
parent 1c43a8f3d3
commit b5d6baaf11
2 changed files with 2 additions and 2 deletions

View file

@ -145,7 +145,7 @@ module CouchRest
end
if bulk
@bulk_save_cache << doc
return bulk_save if @bulk_save_cache.length >= @bulk_save_cache_limit
bulk_save if @bulk_save_cache.length >= @bulk_save_cache_limit
return {"ok" => true} # Compatibility with Document#save
elsif !bulk && @bulk_save_cache.length > 0
bulk_save