fixed all the specs so we are back to green
This commit is contained in:
parent
2d52225a25
commit
e48a6c8866
8 changed files with 36 additions and 18 deletions
|
@ -142,8 +142,14 @@ module CouchRest
|
|||
bulk_save
|
||||
end
|
||||
result = if doc['_id']
|
||||
slug = escape_docid(doc['_id'])
|
||||
CouchRest.put "#{@uri}/#{slug}", doc
|
||||
slug = escape_docid(doc['_id'])
|
||||
begin
|
||||
CouchRest.put "#{@uri}/#{slug}", doc
|
||||
rescue RestClient::ResourceNotFound
|
||||
p "resource not found when saving even tho an id was passed"
|
||||
slug = doc['_id'] = @server.next_uuid
|
||||
CouchRest.put "#{@uri}/#{slug}", doc
|
||||
end
|
||||
else
|
||||
begin
|
||||
slug = doc['_id'] = @server.next_uuid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue