Method: ActiveSupport::Inflector::Inflections#human

Defined in:
lib/active_support/inflector/inflections.rb

#human(rule, replacement) ⇒ Object

Specifies a humanized form of a string by a regular expression rule or by a string mapping. When using a regular expression based replacement, the normal humanize formatting is called after the replacement. When a string is used, the human form should be specified as desired (example: ‘The name’, not ‘the_name’).

human /_cnt$/i, '\1_count'
human 'legacy_col_person_name', 'Name'


220
221
222
# File 'lib/active_support/inflector/inflections.rb', line 220

def human(rule, replacement)
  @humans.prepend([rule, replacement])
end