From d8842d83862fc26de22b3a6ed0a89e56f87b2e7e Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Sat, 1 Apr 2023 13:07:39 -0600 Subject: AƱade controlador de Reviews MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/product.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models/product.rb') diff --git a/app/models/product.rb b/app/models/product.rb index e6f3720..b9ca828 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -11,6 +11,8 @@ class Product < ApplicationRecord belongs_to :company + has_many :product_reviews + validates :name, presence: true validates :unitary_price, presence: true validates :unitary_price, comparison: { greater_than: 0 } -- cgit v1.2.3