diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/inflections.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index 341e2deec9..6522145572 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -193,8 +193,8 @@ class String # Capitalizes the first word, turns underscores into spaces, and strips '_id'. # Like +titleize+, this is meant for creating pretty output. # - # 'employee_salary' # => "Employee salary" - # 'author_id' # => "Author" + # 'employee_salary'.humanize # => "Employee salary" + # 'author_id'.humanize # => "Author" def humanize ActiveSupport::Inflector.humanize(self) end |