diff options
Diffstat (limited to 'app/models/product.rb')
-rw-r--r-- | app/models/product.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/product.rb b/app/models/product.rb index b9ca828..c4514a2 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -12,6 +12,8 @@ class Product < ApplicationRecord belongs_to :company has_many :product_reviews + has_many :product_carts + has_many :carts, through: :product_carts validates :name, presence: true validates :unitary_price, presence: true |