Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
@jzajpt jzajpt authored dhh committed
View
1  activesupport/lib/active_support/inflections.rb
@@ -42,6 +42,7 @@ module ActiveSupport
inflect.singular(/(vert|ind)ices$/i, '\1ex')
inflect.singular(/(matr)ices$/i, '\1ix')
inflect.singular(/(quiz)zes$/i, '\1')
+ inflect.singular(/(database)s$/i, '\1')
inflect.irregular('person', 'people')
inflect.irregular('man', 'men')
View
3  activesupport/test/inflector_test_cases.rb
@@ -99,7 +99,8 @@ module InflectorTestCases
"prize" => "prizes",
"edge" => "edges",
- "cow" => "kine"
+ "cow" => "kine",
+ "database" => "databases"
}
CamelToUnderscore = {

1 comment on commit 7ed2e6c

@rolfb

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.