Changeset 8533
- Timestamp:
- 01/03/08 00:16:47 (6 months ago)
- Files:
-
- trunk/activesupport/CHANGELOG (modified) (1 diff)
- trunk/activesupport/lib/active_support/inflector.rb (modified) (1 diff)
- trunk/activesupport/test/inflector_test_cases.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/CHANGELOG
r8523 r8533 1 1 *SVN* 2 3 * Fixed String#titleize to work for strings with 's too #10571 [trek] 2 4 3 5 * Changed the implementation of Enumerable#group_by to use a double array approach instead of a hash such that the insert order is honored [DHH/Marcel] trunk/activesupport/lib/active_support/inflector.rb
r7569 r8533 163 163 # "x-men: the last stand".titleize #=> "X Men: The Last Stand" 164 164 def titleize(word) 165 humanize(underscore(word)).gsub(/\b( [a-z])/) { $1.capitalize }165 humanize(underscore(word)).gsub(/\b('?[a-z])/) { $1.capitalize } 166 166 end 167 167 trunk/activesupport/test/inflector_test_cases.rb
r7655 r8533 156 156 'Action web service' => 'Action Web Service', 157 157 'actionwebservice' => 'Actionwebservice', 158 'Actionwebservice' => 'Actionwebservice' 158 'Actionwebservice' => 'Actionwebservice', 159 "david's code" => "David's Code", 160 "David's code" => "David's Code", 161 "david's Code" => "David's Code" 159 162 } 160 163