From 2207aae67901c18fc906a42e824e42848a2f8da5 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Sun, 1 Aug 2021 09:51:14 +0100 Subject: [PATCH] Add strong params for checkout We'll need to add more as we go --- app/controllers/split_checkout_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controllers/split_checkout_controller.rb b/app/controllers/split_checkout_controller.rb index 367552a0ba..dc7c898d7f 100644 --- a/app/controllers/split_checkout_controller.rb +++ b/app/controllers/split_checkout_controller.rb @@ -85,6 +85,14 @@ class SplitCheckoutController < ::BaseController @checkout_step = params[:step] end + def order_params + params.require(:order).permit( + :email, :shipping_method_id, :special_instructions, + bill_address_attributes: PermittedAttributes::Address.attributes, + ship_address_attributes: PermittedAttributes::Address.attributes + ) + end + def redirect_to_step if @order.state == "payment" if true# order.has_no_payment_method_chosen?