created upgrade helper
This commit is contained in:
parent
7b03c7ba25
commit
8964a9b282
3 changed files with 77 additions and 2 deletions
|
@ -77,9 +77,11 @@ module CouchRest
|
|||
end
|
||||
|
||||
# GET a document from CouchDB, by id. Returns a Ruby Hash.
|
||||
def get(id)
|
||||
def get(id, params = {})
|
||||
slug = escape_docid(id)
|
||||
hash = CouchRest.get("#{@uri}/#{slug}")
|
||||
url = CouchRest.paramify_url("#{@uri}/#{slug}", params)
|
||||
puts url
|
||||
hash = CouchRest.get(url)
|
||||
doc = if /^_design/ =~ hash["_id"]
|
||||
Design.new(hash)
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue