app/views/posts/show.html.erb
<h1><%= @post.title %></h1>
<% items = @post.items_by_type %>
<% Item::KINDS.each do |kind| %>
<% if items[kind] %>
<h2><%= kind.pluralize %></h2>
<ul>
<% items[kind].each do |item| %>
<li><%= item.title %></li>
<% if item.description.present? %>
<pre><%= item.description %></pre>
<% end %>
<% if item.author.present? %>
<pre>(<%= item.author %>)</pre>
<% end %>
<% end %>
</ul>
<% end %>
<% end %>