diff options
author | Xavier Noria <fxn@hashref.com> | 2010-03-01 22:32:58 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-03-01 22:35:18 +0100 |
commit | 71990a4157f37bc7529184654265679a62a9e121 (patch) | |
tree | bc4b25aa225e906fe41027deaa5e4064ad9d3621 /railties | |
parent | aed8c1f0a471915bc10cf8be3244f4efa69f06b5 (diff) | |
download | rails-71990a4157f37bc7529184654265679a62a9e121.tar.gz rails-71990a4157f37bc7529184654265679a62a9e121.tar.bz2 rails-71990a4157f37bc7529184654265679a62a9e121.zip |
AS guide: documents String#titleize
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/active_support_core_extensions.textile | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index 51ef164d85..5f1849f2b6 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -1378,6 +1378,19 @@ end NOTE: Defined in +active_support/core_ext/string/inflections.rb+. +h5. +titleize+ + +The method +titleize+ capitalizes the words in the receiver: + +<ruby> +"alice in wonderland".titleize # => "Alice In Wonderland" +"fermat's enigma".titleize # => "Fermat's Enigma" +</ruby> + ++titleize+ is aliased to +titlecase+. + +NOTE: Defined in +active_support/core_ext/string/inflections.rb+. + h3. Extensions to +Numeric+ h4. Bytes |