diff --git a/lib/couchrest/mixins/design_doc.rb b/lib/couchrest/mixins/design_doc.rb index a8714c9..35729a7 100644 --- a/lib/couchrest/mixins/design_doc.rb +++ b/lib/couchrest/mixins/design_doc.rb @@ -35,7 +35,7 @@ module CouchRest 'all' => { 'map' => "function(doc) { if (doc['couchrest-type'] == '#{self.to_s}') { - emit(null,1); + emit(doc['_id'],1); } }" }