fixed a bug where :include_docs on a view couldn't be overwritten
This commit is contained in:
parent
55ecda2c90
commit
5258a0ba52
|
@ -133,7 +133,9 @@ module CouchRest
|
|||
fetch_view(name, opts, &block)
|
||||
else
|
||||
begin
|
||||
view = fetch_view name, opts.merge({:include_docs => true}), &block
|
||||
# auto load mentioned documents unless asked differently
|
||||
opts.merge({:include_docs => true}) unless opts.has_key?(:include_docs)
|
||||
view = fetch_view name, opts, &block
|
||||
view['rows'].collect{|r|new(r['doc'])} if view['rows']
|
||||
rescue
|
||||
# fallback for old versions of couchdb that don't
|
||||
|
|
Loading…
Reference in a new issue