humanize(lower_case_and_underscored_word)
Capitalizes the first word and turns underscores into spaces and strips a trailing “_id”, if any.
Example: humanize("employee_salary") # => "Employee salary"
I would like to submit a pull request for humanize to accept a second optional parameter that would allow the string to be humanized without being capitalized.
humanize(lower_case_and_underscored_word, capitalize = true)
Turns underscores into spaces and strips a trailing “_id”, if any". Capitalizes the first word if capitalize=true
Example: humanize("employee_salary", false) # => "employee salary"
I have stumbled into cases where I want to "humanize" a word without capitalizing it, and I've seen
others occurring in the same problem.
What is your opinion about this? Thanks