method

pluralize

pluralize(word)
public

Returns the plural form of the word in the string.

Examples

  "post".pluralize #=> "posts"
  "octopus".pluralize #=> "octopi"
  "sheep".pluralize #=> "sheep"
  "words".pluralize #=> "words"
  "the blue mailman".pluralize #=> "the blue mailmen"
  "CamelOctopus".pluralize #=> "CamelOctopi"

1Note

Moved to ActiveSupport::Inflector

tadman ยท Apr 28, 20091 thank

This isn't gone, it's just been moved to the ActiveSupport module namespace.

See: ActiveSupport::Inflector#pluralize