Type:
Class

A singleton instance of this class is yielded by ActiveSupport::Inflector#inflections, which can then be used to specify additional inflection rules. If passed an optional locale, rules for other languages can be specified. The default locale is :en. Only rules for English are provided.

ActiveSupport::Inflector.inflections(:en) 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.

acronym

acronym(word) Instance Public methods Specifies a new acronym. An acronym must

2015-06-20 00:00:00
uncountable

uncountable(*words) Instance Public methods Add uncountable words that shouldn't

2015-06-20 00:00:00
new

new() Class Public methods

2015-06-20 00:00:00
irregular

irregular(singular, plural) Instance Public methods Specifies a new irregular

2015-06-20 00:00:00
instance

instance(locale = :en) Class Public methods

2015-06-20 00:00:00
clear

clear(scope = :all) Instance Public methods Clears the loaded inflections within

2015-06-20 00:00:00
human

human(rule, replacement) Instance Public methods Specifies a humanized form

2015-06-20 00:00:00
singular

singular(rule, replacement) Instance Public methods Specifies a new singularization

2015-06-20 00:00:00
plural

plural(rule, replacement) Instance Public methods Specifies a new pluralization

2015-06-20 00:00:00