method

humanize

rails latest stable - Class: Inflector

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.1.0) is shown here.

humanize(lower_case_and_underscored_word)
public

Capitalizes the first word and turns underscores into spaces and strips a trailing "_id", if any. Like titleize, this is meant for creating pretty output.

Examples:

  "employee_salary" # => "Employee salary"
  "author_id"       # => "Author"

1Note

Also for numeric

grosser · Oct 25, 20083 thanks
1.humanize == “1″
1000000.humanize == “1.000.000″
1000.12345.humanize == “1.000,12″

http://pragmatig.wordpress.com/2008/10/25/numbers-for-humans-humanize-for-numeric/