lib/couchrest/mixins/views.rb in couchrest-0.34 vs lib/couchrest/mixins/views.rb in couchrest-0.35

- old
+ new

@@ -135,17 +135,17 @@ begin if block.nil? collection_proxy_for(design_doc, name, opts.merge({:include_docs => true})) else view = fetch_view db, name, opts.merge({:include_docs => true}), &block - view['rows'].collect{|r|new(r['doc'])} if view['rows'] + view['rows'].collect{|r|create_from_database(r['doc'])} if view['rows'] end rescue # fallback for old versions of couchdb that don't # have include_docs support view = fetch_view(db, name, opts, &block) - view['rows'].collect{|r|new(db.get(r['id']))} if view['rows'] + view['rows'].collect{|r|create_from_database(db.get(r['id']))} if view['rows'] end end end def fetch_view(db, view_name, opts, &block) @@ -168,6 +168,6 @@ end # module ClassMethods end end -end \ No newline at end of file +end