From d7cccd41437cc435b973b1293978e2872150d446 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Mon, 2 Mar 2020 13:31:34 +0000 Subject: [PATCH] Add guard clause in checkout_controller for empty params[:order] --- app/controllers/checkout_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/checkout_controller.rb b/app/controllers/checkout_controller.rb index ce8728ee37..e3c083e7eb 100644 --- a/app/controllers/checkout_controller.rb +++ b/app/controllers/checkout_controller.rb @@ -239,6 +239,8 @@ class CheckoutController < Spree::StoreController end def order_params(params) + return params[:order] if params[:order].empty? + params.require(:order).permit( :email, :special_instructions, payments_attributes: