Skip to content
This repository
Browse code

Adding inflection of databases (usually we wouldn't amend the current…

… defaults, but this seems to obvious) [#1942 state:committed]

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
  • Loading branch information...
commit 7ed2e6c463071081d9be55b794477adafb1457d3 1 parent 1a2a713
Jiří Zajpt authored February 11, 2009 dhh committed February 12, 2009
1  activesupport/lib/active_support/inflections.rb
@@ -42,6 +42,7 @@ module ActiveSupport
42 42
     inflect.singular(/(vert|ind)ices$/i, '\1ex')
43 43
     inflect.singular(/(matr)ices$/i, '\1ix')
44 44
     inflect.singular(/(quiz)zes$/i, '\1')
  45
+    inflect.singular(/(database)s$/i, '\1')
45 46
 
46 47
     inflect.irregular('person', 'people')
47 48
     inflect.irregular('man', 'men')
3  activesupport/test/inflector_test_cases.rb
@@ -99,7 +99,8 @@ module InflectorTestCases
99 99
     "prize"       => "prizes",
100 100
     "edge"        => "edges",
101 101
 
102  
-    "cow"         => "kine"
  102
+    "cow"         => "kine",
  103
+    "database"    => "databases"
103 104
   }
104 105
 
105 106
   CamelToUnderscore = {

1 note on commit 7ed2e6c

Rolf Bjaanes

I feel the use of “kine” as a plural to cow is way archaic. It should be “cows”.

Please sign in to comment.
Something went wrong with that request. Please try again.