views:

281

answers:

1
def plural(value, string)
  "#{value} #{value.abs == 1 ? string.singularize : string.pluralize}"
end

If not, what would be a short, sweet name for this method?

+8  A: 

ActionView::Helpers::TextHelper

  pluralize(1, 'person')
  # => 1 person

  pluralize(2, 'person')
  # => 2 people

More documentation and examples available here

kyku
There's no such thing as a stupid question :) Thanks!
gsmendoza