<%= form_for(@post) do |f| %> <% if @post.errors.any? %>

<%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:

<% end %>
<%= f.label :title %>
<%= f.text_field :title %>
<%= f.label :body %>
<%= f.text_area :body %>
<%= f.label :tags %>
<%= f.collection_check_boxes :tags, @tags, :to_s, :to_s %>
<%= f.submit %>
<% end %>