Flowdock
Ruby on Rails latest stable (v4.0.2) - 0 notes - Superclass: Object

Class deprecated or moved

This class is deprecated or moved on the latest stable version. The last existing version (v2.1.0) is shown here.

A singleton instance of this class is yielded by Inflector.inflections, which can then be used to specify additional inflection rules. Examples:

  Inflector.inflections do |inflect|
    inflect.plural /^(ox)$/i, '\1\2en'
    inflect.singular /^(ox)en/i, '\1'

    inflect.irregular 'octopus', 'octopi'

    inflect.uncountable "equipment"
  end

New rules are added at the top. So in the example above, the irregular rule for octopus will now be the first of the pluralization and singularization rules that is runs. This guarantees that your rules run before any of the rules that may already have been loaded.

Show files where this class is defined (1 file)
Register or log in to add new notes.