%= form_for(@post) do |f| %>
<% if @post.errors.any? %>
<%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:
<% @post.errors.full_messages.each do |message| %>
- <%= message %>
<% end %>
<% end %>
<%= f.label :title %>
<%= f.text_field :title %>
<%= f.label :body %>
<%= f.text_field :body %>
<%= f.label :author %>
<%= f.text_field :author %>
<%= f.submit %>
<% end %>