modified the 'all' view to emit doc ids so we can do Model.all(:keys => [1,2])

This commit is contained in:
Matt Aimonetti 2009-07-22 15:45:18 -07:00
parent fc1ad2a07e
commit 87d246d30e

View file

@ -35,7 +35,7 @@ module CouchRest
'all' => { 'all' => {
'map' => "function(doc) { 'map' => "function(doc) {
if (doc['couchrest-type'] == '#{self.to_s}') { if (doc['couchrest-type'] == '#{self.to_s}') {
emit(null,1); emit(doc['_id'],1);
} }
}" }"
} }