diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-07-25 16:03:58 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-07-25 16:03:58 +0100 |
commit | e033b5d037c303a34e0c5aec2b38ec6270f00f86 (patch) | |
tree | 7c69e6ef81028d0c1978d0b1dcea14893a146554 /activesupport/lib/active_support/inflector.rb | |
parent | 0c68d23f19010379a9320690ca17a26743c8f071 (diff) | |
download | rails-e033b5d037c303a34e0c5aec2b38ec6270f00f86.tar.gz rails-e033b5d037c303a34e0c5aec2b38ec6270f00f86.tar.bz2 rails-e033b5d037c303a34e0c5aec2b38ec6270f00f86.zip |
Merge docrails
Diffstat (limited to 'activesupport/lib/active_support/inflector.rb')
-rw-r--r-- | activesupport/lib/active_support/inflector.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb index 92c1de057b..4ee96b13b4 100644 --- a/activesupport/lib/active_support/inflector.rb +++ b/activesupport/lib/active_support/inflector.rb @@ -155,7 +155,7 @@ module ActiveSupport # Examples: # "posts".singularize # => "post" # "octopi".singularize # => "octopus" - # "sheep".singluarize # => "sheep" + # "sheep".singularize # => "sheep" # "word".singularize # => "word" # "CamelOctopi".singularize # => "CamelOctopus" def singularize(word) @@ -261,9 +261,9 @@ module ActiveSupport # <%= link_to(@person.name, person_path(@person)) %> # # => <a href="/person/1-donald-e-knuth">Donald E. Knuth</a> def parameterize(string, sep = '-') - # replace accented chars with ther ascii equivalents + # replace accented chars with their ascii equivalents parameterized_string = transliterate(string) - # Turn unwanted chars into the seperator + # Turn unwanted chars into the separator parameterized_string.gsub!(/[^a-z0-9\-_\+]+/i, sep) unless sep.blank? re_sep = Regexp.escape(sep) |