<%= form_for @order, url: update_checkout_path(@order.state), html: { id: "checkout_form_#{@order.state}" } do |form| %>
<% if @order.state == 'address' || !@order.email? %>
<%= form.label :email %>
<%= form.email_field :email, required: true %>
<% end %>
<%= render @order.state, form: form %>
<% end %>