diff --git a/lib/couchrest/mixins/views.rb b/lib/couchrest/mixins/views.rb index 20dd157..fb9269c 100644 --- a/lib/couchrest/mixins/views.rb +++ b/lib/couchrest/mixins/views.rb @@ -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