我有这个form_for
<%= form_for([@post, @post.comments.build]) do |f| %>
<% if @post.errors.any? %>
<div id="error_explanation">
<ul>
<% @post.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :body %><br />
<%= f.text_area :body %>
</div>