diff --git a/app/models/product_variant.rb b/app/models/product_variant.rb index 8ed85c33..658f6df0 100644 --- a/app/models/product_variant.rb +++ b/app/models/product_variant.rb @@ -5,4 +5,6 @@ class ProductVariant property :position, type: Fixnum, default: 0 belongs_to :product belongs_to :supplier + + view :by_product_id, key: :product_id end