C&V test improvements
This commit is contained in:
+4
-4
@@ -52,19 +52,19 @@ class List
|
||||
}
|
||||
}|, reduce_function: '_sum'
|
||||
|
||||
view :active_for_supplier_and_section_view, type: :custom, map_function: %[function(doc){
|
||||
view :active_for_supplier_and_section_view, type: :custom, map_function: %|function(doc){
|
||||
if(doc.ruby_class == 'List' && doc.state == 'active'){
|
||||
emit([doc.supplier_id, doc.section_id], 1);
|
||||
}
|
||||
}], reduce_function: '_sum'
|
||||
}|, reduce_function: '_sum'
|
||||
|
||||
view :active_users_view, type: :custom, map_function: %[function(doc){
|
||||
view :active_users_view, type: :custom, map_function: %|function(doc){
|
||||
if(doc.ruby_class == 'List' && doc.state == 'active'){
|
||||
doc.user_ids && doc.user_ids.forEach(function(uid){
|
||||
emit([doc.supplier_id, uid], 1);
|
||||
})
|
||||
}
|
||||
}], reduce_function: '_sum'
|
||||
}|, reduce_function: '_sum'
|
||||
|
||||
view :for_user_view, type: :custom, map_function: %|function(doc){
|
||||
if(doc.ruby_class == 'List' && doc.user_ids && doc.user_ids.length){
|
||||
|
||||
Reference in New Issue
Block a user