Permalink
Browse files

pluralize the comment

  • Loading branch information...
1 parent 856f45c commit 237d09a45ce744732959ee85784d1f6470871d96 @xmonkey committed Nov 28, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 app/views/posts/index.html.erb
@@ -1,4 +1,5 @@
<h2>Post list</h2>
<% @posts.each do |post| %>
- <p> <%= link_to post.title, post.url %> <%= post.comments.count.to_s + " comments" %> </p>
+ <p> <%= link_to post.title, post.url %>
+ <%= pluralize(post.comments.count, ' comment') %> </p>
<% end %>

0 comments on commit 237d09a

Please sign in to comment.