From d39468013e727fa37d551bdf9c39a7cf8f593266 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sat, 30 Jan 2021 16:51:46 +0000 Subject: [PATCH] Clarify CartService#populate arguments This method doesn't use :products anywhere, it doesn't need to be passed in as part of the argument. --- app/controllers/cart_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/cart_controller.rb b/app/controllers/cart_controller.rb index 4be930cc12..658ef2e2f5 100644 --- a/app/controllers/cart_controller.rb +++ b/app/controllers/cart_controller.rb @@ -11,7 +11,7 @@ class CartController < BaseController Spree::Adjustment.without_callbacks do cart_service = CartService.new(order) - cart_service.populate(params.slice(:products, :variants, :quantity), true) + cart_service.populate(params.slice(:variants, :quantity), true) if cart_service.valid? order.update_distribution_charge! order.cap_quantity_at_stock!