examples/helloworld/app/views/posts/_form.html.erb
<%= form_for(@post) do |f| %>
<% if @post.errors.any? %>
<div id="errorExplanation">
<h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2>
<ul>
<% @post.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :title %><br />
<%= f.text_field :title %>
</div>
<div class="field">
<%= f.label :content %><br />
<%= f.text_field :content %>
</div>
<!--<div class="field">-->
<!--%= f.label :comments %><br />-->
<!--%= f.text_field :comments %>-->
<!--</div>-->
<div class="actions">
<%= f.submit %>
</div>
<% end %>