Skip to content

Commit

Permalink
πŸžπŸ”¨ Marketplace: Buying Products Fix Delivery Form
Browse files Browse the repository at this point in the history
Turns out, our `Delivery` form was going to a weird spot which may or
may not be why we couldn't place orders on Crumble & Whisk

Anyway, now instead of posting to
`/marketplace/carts/:cart_id/delivery.:delivery_id` it will post to
`/marketplace/carts/:cart_id/delivery`
  • Loading branch information
zspencer committed Nov 30, 2023
1 parent 6c9dcca commit d227ebb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/furniture/marketplace/cart/deliveries/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%= turbo_frame_tag(delivery) do %>
<%= form_with model: delivery.location do |delivery_form| %>
<%= form_with model: delivery, url: url_for(delivery.cart.location(child: :delivery)) do |delivery_form| %>
<%= render "text_field", attribute: :delivery_address, form: delivery_form %>

<%= render "email_field", attribute: :contact_email, form: delivery_form %>
Expand Down
1 change: 1 addition & 0 deletions app/furniture/marketplace/cart/deliveries/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<h3>
<%= t("marketplace.cart.deliveries.edit.header") %>
</h3>

<%= render "form", delivery: delivery %>
<%- end %>

0 comments on commit d227ebb

Please sign in to comment.