diff options
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/inflector.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb index baa342f669..ee5d5753c9 100644 --- a/activesupport/lib/active_support/inflector.rb +++ b/activesupport/lib/active_support/inflector.rb @@ -162,7 +162,7 @@ module Inflector # "man from the boondocks".titleize #=> "Man From The Boondocks" # "x-men: the last stand".titleize #=> "X Men: The Last Stand" def titleize(word) - humanize(underscore(word)).gsub(/\b([a-z])/) { $1.capitalize } + humanize(underscore(word)).gsub(/\b('?[a-z])/) { $1.capitalize } end # The reverse of +camelize+. Makes an underscored form from the expression in the string. |