fixed a bug where :include_docs on a view couldn't be overwritten
This commit is contained in:
parent
55ecda2c90
commit
5258a0ba52
1 changed files with 3 additions and 1 deletions
|
@ -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