diff --git a/lib/couchrest/model/designs/view.rb b/lib/couchrest/model/designs/view.rb index a0f3eb9c..56507b80 100644 --- a/lib/couchrest/model/designs/view.rb +++ b/lib/couchrest/model/designs/view.rb @@ -485,7 +485,7 @@ def define(design_doc, name, opts = {}) model = design_doc.model # Is this an all view? - if name.to_s == 'all' + if name.to_s == 'all' && !opts[:map] opts[:map] = <<-EOF function(doc) { if (doc['#{model.model_type_key}'] == '#{model.model_type_value}') {