aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-11-07 01:20:54 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-11-07 01:20:54 +0000
commit8210f70c7cbc14a762b198f21814b96664b2c867 (patch)
tree39fd095a68f00fcd1700794e4589bef3beaef7f2
parent645de3391276a654ab4a653f5bbe47efc5759b77 (diff)
downloadrails-8210f70c7cbc14a762b198f21814b96664b2c867.tar.gz
rails-8210f70c7cbc14a762b198f21814b96664b2c867.tar.bz2
rails-8210f70c7cbc14a762b198f21814b96664b2c867.zip
Fix status pluralization bug so status_codes doesn't get pluralized as statuses_code. Closes #2758.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2900 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--activesupport/CHANGELOG2
-rw-r--r--activesupport/lib/active_support/inflections.rb4
-rw-r--r--activesupport/test/inflector_test.rb1
3 files changed, 5 insertions, 2 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG
index faf281f0a5..8b77ede4e2 100644
--- a/activesupport/CHANGELOG
+++ b/activesupport/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fix status pluralization bug so status_codes doesn't get pluralized as statuses_code. #2758 [keithm@infused.org]
+
* Added Kernel#silence_stderr to silence stderr for the duration of the given block [Sam Stephenson]
* Changed Kernel#` to print a message to stderr (like Unix) instead of raising Errno::ENOENT on Win32 [Sam Stephenson]
diff --git a/activesupport/lib/active_support/inflections.rb b/activesupport/lib/active_support/inflections.rb
index b40f9cc1eb..18fa4c336c 100644
--- a/activesupport/lib/active_support/inflections.rb
+++ b/activesupport/lib/active_support/inflections.rb
@@ -3,7 +3,7 @@ Inflector.inflections do |inflect|
inflect.plural /s$/i, 's'
inflect.plural /(ax|test)is$/i, '\1es'
inflect.plural /(octop|vir)us$/i, '\1i'
- inflect.plural /(alias|status)/i, '\1es'
+ inflect.plural /(alias|status)$/i, '\1es'
inflect.plural /(bu)s$/i, '\1ses'
inflect.plural /(buffal|tomat)o$/i, '\1oes'
inflect.plural /([ti])um$/i, '\1a'
@@ -50,4 +50,4 @@ Inflector.inflections do |inflect|
inflect.irregular 'move', 'moves'
inflect.uncountable %w( equipment information rice money species series fish sheep )
-end \ No newline at end of file
+end
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb
index cbf8250823..995871f826 100644
--- a/activesupport/test/inflector_test.rb
+++ b/activesupport/test/inflector_test.rb
@@ -81,6 +81,7 @@ class InflectorTest < Test::Unit::TestCase
"equipment" => "equipment",
"bus" => "buses",
"status" => "statuses",
+ "status_code" => "status_codes",
"mouse" => "mice",
"louse" => "lice",