diff options
author | HombreLaser <sebastian-440@live.com> | 2023-04-11 20:28:11 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-04-11 20:28:11 -0600 |
commit | b9e6c425a6142b2b78311cfc7b51aa0de7481440 (patch) | |
tree | 9350e616a04a7ddbc148ed86ee925fb589dd7665 /app/models/product.rb | |
parent | bb9554c298a5edc6c0ff90ec7497adff299891e0 (diff) |
Añadidos modelos para órdenes
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 c4514a2..51d6c57 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -14,6 +14,8 @@ class Product < ApplicationRecord has_many :product_reviews has_many :product_carts has_many :carts, through: :product_carts + has_many :product_orders + has_many :orders, through: :product_orders validates :name, presence: true validates :unitary_price, presence: true |