I have "posts" and "comments", and I'd like to display the number of
comments each post has (and display 0 if none). In the index Posts
view, I display a list of posts and their authors using the below
partial. What I can't figure out is how to limit the comment count to
the post listing (my attempts so far show the total number of comments
in the database). How do I limit the count?
<% div_for post do %>
<p><strong><%= link_to_unless_current h(post.title), post %></strong>