fixed a typo in the previous commit
This commit is contained in:
parent
d383c5a7d4
commit
7455152f63
3 changed files with 22 additions and 7 deletions
|
@ -133,9 +133,8 @@ module CouchRest
|
|||
fetch_view(name, opts, &block)
|
||||
else
|
||||
begin
|
||||
# auto load mentioned documents unless asked differently
|
||||
opts.merge({:include_docs => true}) unless opts.has_key?(:include_docs)
|
||||
view = fetch_view name, opts, &block
|
||||
# auto load mentioned documents unless asked differently (didn't use merge! on a previous line to avoid duping the object)
|
||||
view = fetch_view name, (opts.has_key?(:include_docs) ? opts : opts.merge({:include_docs => true})), &block
|
||||
view['rows'].collect{|r|new(r['doc'])} if view['rows']
|
||||
rescue
|
||||
# fallback for old versions of couchdb that don't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue