Flowdock
method

singularize

Importance_1
v2.2.1 - Show latest stable - 0 notes - Class: ActiveSupport::CoreExtensions::String::Inflections
singularize() public

The reverse of pluralize, returns the singular form of a word in a string.

  "posts".singularize            # => "post"
  "octopi".singularize           # => "octopus"
  "sheep".singularize            # => "sheep"
  "word".singularize             # => "word"
  "the blue mailmen".singularize # => "the blue mailman"
  "CamelOctopi".singularize      # => "CamelOctopus"
Show source
Register or log in to add new notes.