humanize()
public
Capitalizes the first word, turns
underscores into spaces, and strips ‘_id’. Like titleize, this
is meant for creating pretty output.
'employee_salary'.humanize
'author_id'.humanize
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 198
def humanize
ActiveSupport::Inflector.humanize(self)
end