I have a line of code in a basic Rails blog application I did that determines whether the suffix to the number of comments should be "comment" (if 1) or "comments" (0 or 2+)
Currently, it is a line in the view looking like this:
<%= post.comments.count() %> <%= post.comments.count() == 1 ? "comment" : "comments" -%>
However, since I wrote that I have done some more studying, and realized that this logic shouldn't actually go in the view.
Am I right to assume that the real place for this is in the posts helper?
How can I implement it?