Type:
Module

The Inflector transforms words from singular to plural, class names to table names, modularized class names to ones without, and class names to foreign keys. The default inflections for pluralization, singularization, and uncountable words are kept in inflections.rb.

The Rails core team has stated patches for the inflections library will not be accepted in order to avoid breaking legacy applications which may be relying on errant inflections. If you discover an incorrect inflection and require it for your application or wish to define rules for languages other than English, please correct or add them yourself (explained below).

dasherize

dasherize(underscored_word) Instance Public methods Replaces underscores with

2015-06-20 00:00:00
deconstantize

deconstantize(path) Instance Public methods Removes the rightmost segment from

2015-06-20 00:00:00
camelize

camelize(term, uppercase_first_letter = true) Instance Public methods By default

2015-06-20 00:00:00
ordinal

ordinal(number) Instance Public methods Returns the suffix that should be added

2015-06-20 00:00:00
tableize

tableize(class_name) Instance Public methods Create the name of a table like

2015-06-20 00:00:00
foreign_key

foreign_key(class_name, separate_class_name_and_id_with_underscore = true) Instance Public methods

2015-06-20 00:00:00
underscore

underscore(camel_cased_word) Instance Public methods Makes an underscored, lowercase

2015-06-20 00:00:00
pluralize

pluralize(word, locale = :en) Instance Public methods Returns the plural form

2015-06-20 00:00:00
transliterate

transliterate(string, replacement = "?") Instance Public methods Replaces non-ASCII

2015-06-20 00:00:00