summaryrefslogtreecommitdiff
path: root/app/models/cart.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/cart.rb')
-rw-r--r--app/models/cart.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/cart.rb b/app/models/cart.rb
index f9e5ea0..4bccd67 100644
--- a/app/models/cart.rb
+++ b/app/models/cart.rb
@@ -2,5 +2,7 @@
# Cart
class Cart < ApplicationRecord
- has_one :user_account
+ has_one :user_account, dependent: :destroy
+ has_many :product_carts
+ has_many :products, through: :product_carts
end