diff --git a/lib/couchrest/mixins/views.rb b/lib/couchrest/mixins/views.rb index f6d8b7f..e2aa685 100644 --- a/lib/couchrest/mixins/views.rb +++ b/lib/couchrest/mixins/views.rb @@ -141,7 +141,7 @@ module CouchRest # 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(database.get(r['id']))} if view['rows'] + view['rows'].collect{|r|new(db.get(r['id']))} if view['rows'] end end end