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