From 71990a4157f37bc7529184654265679a62a9e121 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 1 Mar 2010 22:32:58 +0100 Subject: AS guide: documents String#titleize --- .../guides/source/active_support_core_extensions.textile | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'railties/guides/source') 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: + + +"alice in wonderland".titleize # => "Alice In Wonderland" +"fermat's enigma".titleize # => "Fermat's Enigma" + + ++titleize+ is aliased to +titlecase+. + +NOTE: Defined in +active_support/core_ext/string/inflections.rb+. + h3. Extensions to +Numeric+ h4. Bytes -- cgit v1.2.3