diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/lib/extensions/couchrest.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/lib/extensions/couchrest.rb b/core/lib/extensions/couchrest.rb index 0dca632..5938df4 100644 --- a/core/lib/extensions/couchrest.rb +++ b/core/lib/extensions/couchrest.rb @@ -13,7 +13,9 @@ module CouchRest::Model::Designs Dir.glob("#{dir}/*.js") do |js| name = File.basename(js, '.js') file = File.open(js, 'r') - view name.to_sym, :map => file.read + view name.to_sym, + :map => file.read, + :reduce => "function(key, values, rereduce) { return sum(values); }" end end end |