From 2aed4336855b882a203afb76a58a59a2fd87bd14 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Thu, 2 Jun 2016 16:45:53 +0200 Subject: [PATCH] Add required inclusion view --- app/models/product.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/product.rb b/app/models/product.rb index 63417582..fd190bd8 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -24,6 +24,7 @@ class Product validates :supplier_id, presence: true validates :price, numericality: true view :by_supplier_id_and_id, key: [:supplier_id, :_id] + view :by_product_category_id, key: :product_category_id #after_save :persist_product_category_ids