Fix active for supplier view

This commit is contained in:
2013-03-14 16:18:20 +01:00
parent 5d1ebaad07
commit d215e4ab8b
+1 -1
View File
@@ -23,7 +23,7 @@ class List
validates :supplier_id, presence: true validates :supplier_id, presence: true
view :by_supplier_id_and_id, key: [:supplier_id, :_id] view :by_supplier_id_and_id, key: [:supplier_id, :_id]
view :for_supplier_view, key: [:supplier_id, :state, :created_at] view :for_supplier_view, key: [:supplier_id, :created_at]
view :active_by_table_id_view, type: :custom, map_function: %|function(doc){ view :active_by_table_id_view, type: :custom, map_function: %|function(doc){
if(doc.ruby_class == 'List' && doc.state == 'active'){ if(doc.ruby_class == 'List' && doc.state == 'active'){