I am building a blog app. I'd like to be able to pluralize the word "article" if more than one "post" is "published."
Like so: Available Articles or Available Article
This is what I have....
Available <%= pluralize @posts.published, "Article" %>:
I've tried
Available <%= pluralize @posts.published.count, "Article" %>:
and that works...but I don't want the number. It shouldn't read Available 5 Articles....it should have no number.
I have been looking for the answer to this myself and wasn't satisfied with any of the existing ones. Here's the tidiest solution I found:
Documentation is here. Relevant bits: