From f12d09f97fb54acb0a44eebbc049b4e30318634a Mon Sep 17 00:00:00 2001 From: Yuichiro Suzuki Date: Thu, 20 Dec 2012 01:20:05 +0900 Subject: Fix: documentation for String#humanize --- activesupport/lib/active_support/core_ext/string/inflections.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index 2194dafe4d..3717388ace 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -182,8 +182,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 -- cgit v1.2.3