%= form_for(@thing) do |f| %>
<% if @thing.errors.any? %>
<%= pluralize(@thing.errors.count, "error") %> prohibited this thing from being saved:
<% @thing.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<%= f.label :name %>
<%= f.text_field :name %>
<%= f.label :price %>
<%= f.text_field :price %>
<%= f.label :qty %>
<%= f.number_field :qty %>
<%= f.submit %>
<% end %>