method
humanize
v1.1.6 -
Show latest stable
- Class:
Inflector
humanize(lower_case_and_underscored_word)public
No documentation available.
# File activesupport/lib/active_support/inflector.rb, line 136
def humanize(lower_case_and_underscored_word)
lower_case_and_underscored_word.to_s.gsub(/_id$/, "").gsub(/_/, " ").capitalize
end 1Note
Also for numeric
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/