<%= 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 %>

  <div class="field">
    <%= f.label :name %><br>
    <%= f.text_field :name, size: 40 %>
  </div>
  <div class="field">
    <%= f.label :address %><br>
    <%= f.text_area :address, rows: 3, cols: 40 %>
  </div>
  <div class="field">
    <%= f.label :email %><br>
    <%= f.email_field :email, size: 40 %>
  </div>
  <div class="field">
    <%= f.label :pay_type %><br>
    <%= f.select :pay_type, Order::PAYMENT_TYPES, prompt: 'Select a payment method' %>
  </div>
  <div class="actions">
    <%= f.submit 'Place Order' %>
  </div>
<% end %>

<%= form_for(@order) do |f| %>
  <% if @order.errors.any? %>
    <div class="alert alert-danger" role="alert">
      <h2><%= pluralize(@order.errors.count, "error") %> prohibited this product from being saved:</h2ß>

      <ul>
      <% @order.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
 
  <div class="form-group">
    <%= f.label :name %><br>
    <%= f.text_field :name, class: "form-control", placeholder: "Enter your full name",  style: "width: 400px", autofocus: ""%>
  </div>
  <div class="field">
    <%= f.label :address %><br>
    <%= f.text_area :address, rows: 6, class: "form-control", placeholder: "Delivery address",  style: "width: 400px" %>
  </div>
  <div class="field">
    <%= f.label :email %><br>
    <%= f.email_field :email, class: "form-control", placeholder: "example@example.com",  style: "width: 400px" %>
  </div>
  <div class="field">
    <%= f.label :pay_type %><br>
    <%= f.select :pay_type, Order::PAYMENT_TYPES, prompt: 'Select a payment method' %>
  </div>
  <br />




  <div class="actions">
    <%= f.submit 'Place order', class: "btn btn-success" %>
  </div>
<% end %>

Modify _form for new order
Modify _form for new order
