Iteration J3: Translating Checkout
Now we feel that we’re in the home stretch. The new order page is next:
» | <div class="depot_form"> |
» | <fieldset> |
» | <legend><%= t('.legend') %></legend> |
| <%= render 'form', order: @order %> |
| </fieldset> |
| </div> |
Here’s the form that’s used by this page:
| <%= form_for(order) do |f| %> |
| <% if order.errors.any? %> |
| <div id="error_explanation"> |
| <h2><%= pluralize(order.errors.count, "error") %> |
| prohibited this order from being saved:</h2> |
| |
| <ul> |
| <% order.errors.full_messages.each do |message| %> |
| <li><%= message %></li> |
| <% end %> |
| </ul> |
| </div> |
| <% end |
Get Agile Web Development with Rails 5, 1st Edition 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.