fixed a bug where :include_docs on a view couldn't be overwritten

This commit is contained in:
Matt Aimonetti 2009-03-02 21:21:59 -08:00
parent 55ecda2c90
commit 5258a0ba52

View file

@ -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