Fixing incorrectly generated document URIs with testing
Signed-off-by: Marcos Tapajós <tapajos@gmail.com>
This commit is contained in:
parent
118c944b85
commit
08cf9e59b6
2 changed files with 10 additions and 2 deletions
|
@ -65,7 +65,7 @@ module CouchRest
|
|||
# Returns the CouchDB uri for the document
|
||||
def uri(append_rev = false)
|
||||
return nil if new?
|
||||
couch_uri = "http://#{database.root}/#{CGI.escape(id)}"
|
||||
couch_uri = "#{database.root}/#{CGI.escape(id)}"
|
||||
if append_rev == true
|
||||
couch_uri << "?rev=#{rev}"
|
||||
elsif append_rev.kind_of?(Integer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue