%= 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_area :body %>
<%= f.label :tags %>
<%= f.collection_check_boxes :tags, @tags, :to_s, :to_s %>
<%= f.submit %>
<% end %>