aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/inflector.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-07-31 16:21:07 -0300
committerEmilio Tagua <miloops@gmail.com>2009-07-31 16:21:07 -0300
commit3de59e916d6a3d4eab202cf0c99b1f88905a3b43 (patch)
treedef6d6a808ebe187be1f37f8a739fd786cc11f02 /activesupport/lib/active_support/inflector.rb
parentc1cbf02e3170f1004daf4a146cbc41176c2458d3 (diff)
parent62fd1d3716b4b5fd1d91cdcc77003efe80fc5a7e (diff)
downloadrails-3de59e916d6a3d4eab202cf0c99b1f88905a3b43.tar.gz
rails-3de59e916d6a3d4eab202cf0c99b1f88905a3b43.tar.bz2
rails-3de59e916d6a3d4eab202cf0c99b1f88905a3b43.zip
Merge commit 'rails/master'
Conflicts: activerecord/lib/active_record/associations.rb
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)