Fixing some regressions to data submission

This commit is contained in:
Will Marshall
2014-07-17 14:46:46 +10:00
parent 541fe9ec37
commit 67922f38df
2 changed files with 4 additions and 4 deletions

View File

@@ -25,10 +25,10 @@ Darkswarm.factory 'Checkout', (CurrentOrder, ShippingMethods, PaymentMethods, $h
munged_order["ship_address_attributes"] = value
when "payment_method_id"
munged_order["payments_attributes"] = [{payment_method_id: value}]
when "form_state" # don't keep this shit
else
when "shipping_method_id", "payment_method_id", "email"
munged_order[name] = value
else
# Ignore everything else
if @ship_address_same_as_billing
munged_order.ship_address_attributes = munged_order.bill_address_attributes