aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2015-01-23 15:12:50 +0000
committerGareth Rees <gareth@mysociety.org>2015-02-04 15:02:00 +0000
commit93c137a906715c194dc64044556c148d813c87a3 (patch)
treec7479f296aa16b9eb50a0bcea6edd08daa5104dc /spec/controllers/request_controller_spec.rb
parent3fe8f773df749988a1d88141330e65b13eb43ab6 (diff)
Nicer capitalize first letter only
String#capitalize downcases remaining letters, so: > 'heLLo WorLd'.capitalize # => "Hello world" Our version only works on the first character of the String, preserving the case of the rest of the String: > 'heLLo WorLd'.sub(/\S/) { |m| Unicode.upcase(m) } # => 'HeLLo WorLd' Also handle unicode.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
0 files changed, 0 insertions, 0 deletions