Skip to content

Commit

Permalink
Don't use link_to method:post
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszreszke committed Aug 6, 2024
1 parent f3a09a6 commit 115f29a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rails_application/app/views/orders/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<td class="py-2"><%= product.name %></td>
<td class="py-2"><%= number_to_currency(product.price) %></td>
<td class="py-2">
<%= link_to "Add", add_item_order_path(id: @order_id, product_id: product.id), {method: :post, class: "text-blue-500 hover:underline"} %>
<%= button_to "Add", add_item_order_path(id: @order_id, product_id: product.id), class: "text-blue-500 hover:underline" %>
</td>
</tr>
<% end %>
Expand Down

0 comments on commit 115f29a

Please sign in to comment.