<%= form_for(@thing) do |f| %>
  <% if @thing.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@thing.errors.count, "error") %> prohibited this thing from being saved:</h2>

      <ul>
      <% @thing.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
