7.1 Rendering Partial Collections

First, we will make a comment partial to extract showing all the
comments for the post. Create the file
app/views/comments/_comment.html.erb and put the following into it:

<p>
  <strong>Commenter:</strong>
  <%= comment.commenter %>
</p>

<p>
  <strong>Comment:</strong>
  <%= comment.body %>
</p>

Then you can change app/views/posts/show.html.erb to look like the
following:
7.1 Rendering Partial Collections (reformat)