From 96ce018912ceffb7270b883a8982b1e2403cda1c Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 4 Apr 2023 20:08:37 -0600 Subject: AƱade modelo ProductCart 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 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 -- cgit v1.2.3