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

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

<% end %>

<%= @post.title %>

<%= @post.body.html_safe %>
<% if @post.published? %> Written <%= timeago_tag @post.published_at, format: "%B %d, %Y" %> by <% elsif @post.new_record? %> Currently being written by <% else %> Draft last updated <%= timeago_tag @post.updated_at, format: "%B %d, %Y" %> by <% end %> <%= @post.author.send(Proclaim.author_name_method) %>
<%= f.hidden_field :title %> <%= f.hidden_field :body %> <% if @post.published? and not @post.new_record? %> This post has already been published <% else %>
<%= label_tag :publish, "Publish this post" %> <%= check_box_tag :publish, "true", @post.published? %>
<% end %>
<%= f.submit %>
<% end %>