diff options
author | Xavier Noria <fxn@hashref.com> | 2010-03-02 00:06:32 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-03-02 00:06:32 +0100 |
commit | fbce2327a9d327a203bb401708b6e3a4bd023e38 (patch) | |
tree | 35fe57556b615688030d60ca23c21226770f95c7 /railties/guides/source | |
parent | aab42ccdab084dbd661d3e21d9fce15d0f3f6a06 (diff) | |
download | rails-fbce2327a9d327a203bb401708b6e3a4bd023e38.tar.gz rails-fbce2327a9d327a203bb401708b6e3a4bd023e38.tar.bz2 rails-fbce2327a9d327a203bb401708b6e3a4bd023e38.zip |
AS guide: documents String#parameterize
Diffstat (limited to 'railties/guides/source')
-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 307f7eddb3..291dc5e96a 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -1437,6 +1437,19 @@ end NOTE: Defined in +active_support/core_ext/string/inflections.rb+. +h5. +parameterize+ + +The method +parameterize+ normalizes its receiver in a way that can be used in pretty URLs. + +<ruby> +"John Smith".parameterize # => "john-smith" +"Kurt Gödel".parameterize # => "kurt-godel" +</ruby> + +In fact, the result string is wrapped in an instance of +ActiveSupport::Multibyte::Chars+. + +NOTE: Defined in +active_support/core_ext/string/inflections.rb+. + h3. Extensions to +Numeric+ h4. Bytes |