instance method
human
Ruby on Rails 4.1.16
Since v2.2.3Signature
human(rule, replacement)
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'
Parameters
-
rulereq -
replacementreq
Source
# File activesupport/lib/active_support/inflector/inflections.rb, line 174
def human(rule, replacement)
@humans.prepend([rule, replacement])
end
Defined in activesupport/lib/active_support/inflector/inflections.rb line 174
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Inflector::Inflections