From 61110336bc5a924346f0654cb5bb812101c3bc7a Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Thu, 6 Apr 2023 14:53:02 -0600 Subject: AƱade specs de cxarts_controller MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/carts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/api/carts_controller.rb b/app/controllers/api/carts_controller.rb index 0e14c17..d7c1529 100644 --- a/app/controllers/api/carts_controller.rb +++ b/app/controllers/api/carts_controller.rb @@ -20,7 +20,7 @@ module Api end def destroy - if @cart.delete_product(product.id) + if @cart.delete_product(params[:id]) render status: :no_content else render status: :not_found -- cgit v1.2.3