Iteration J3: Translating Checkout
Now we’re entering the homestretch. The new order page is next:
| <div class="mx-auto md:w-2/3 w-full"> |
» | <h1 class="font-bold text-4xl"><%= t('.legend') %></h1> |
| |
| <%= render "form", order: @order %> |
| </div> |
Here’s the form that’s used by this page:
| <%= form_with(model: order, class: "contents") do |form| %> |
| <% if order.errors.any? %> |
| <div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 |
| font-medium rounded-lg mt-3"> |
| <h2><%= pluralize(order.errors.count, "error") %> |
| prohibited this order from being saved:</h2> |
| |
| <ul> |
| <% order.errors ... |
Get Agile Web Development with Rails 7 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.