summaryrefslogtreecommitdiff
path: root/app/models/cart.rb
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-04-06 14:53:02 -0600
committerHombreLaser <sebastian-440@live.com>2023-04-06 14:53:02 -0600
commit61110336bc5a924346f0654cb5bb812101c3bc7a (patch)
treed51511956e1246819c2480a4f3c30b6074bfe7ad /app/models/cart.rb
parentfc191f53503629087fd453e626ec2a4c58e0a21b (diff)
Añade specs de cxarts_controller
Diffstat (limited to 'app/models/cart.rb')
-rw-r--r--app/models/cart.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/cart.rb b/app/models/cart.rb
index b08fc13..87e91d3 100644
--- a/app/models/cart.rb
+++ b/app/models/cart.rb
@@ -7,7 +7,7 @@ class Cart < ApplicationRecord
has_many :products, through: :product_carts
def delete_product(product_id)
- relation = product_carts.find_by(product_id:, cart_id:)
+ relation = ProductCart.find_by(product_id:, cart_id: id)
return false if relation.nil?