Snack Recipe 10 in Chad Fowler's /Rails Recipes/ sez:
<%= pluralize @recipes.size, 'unread recipe' %>
I pluralize up in my model. (I generate a lot of HTML there. Sue me!)
I can get to the Aspect Oriented Programming version that Inflector adds to strings:
type = type.pluralize unless count == 1
return count.to_s + ' ' + type
I want to dry that up; one line for two. But one line...
Inflector.pluralize count, (' ' + type).pluralize
ArgumentError: wrong number of arguments (2 for 1)
Why am I asking about such a trivial method?? Because, while we are on the topic, I also want to abuse^W exploit h() in my models, and those naughty single-letter methods are super-hard to Google for!