aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/inflector.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-07-28 09:00:33 +0200
committerJosé Valim <jose.valim@gmail.com>2009-07-28 09:00:33 +0200
commitd9aae2b56e64a4f417eaffa99e10cca274e928e7 (patch)
tree8438f6f784df9b252c0f834bc7cb9c369103d4cd /activesupport/lib/active_support/inflector.rb
parent5025ae610f89989f3e15241ec7065e3d443614d9 (diff)
parent9533e0eca76b1df68a90e1ebe395d7b6a59d8e91 (diff)
downloadrails-d9aae2b56e64a4f417eaffa99e10cca274e928e7.tar.gz
rails-d9aae2b56e64a4f417eaffa99e10cca274e928e7.tar.bz2
rails-d9aae2b56e64a4f417eaffa99e10cca274e928e7.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'activesupport/lib/active_support/inflector.rb')
-rw-r--r--activesupport/lib/active_support/inflector.rb6
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)