diff options
-rw-r--r-- | activesupport/lib/active_support/inflections.rb | 1 | ||||
-rw-r--r-- | activesupport/test/inflector_test_cases.rb | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflections.rb b/activesupport/lib/active_support/inflections.rb index b6d276953a..8fb3fa9aa2 100644 --- a/activesupport/lib/active_support/inflections.rb +++ b/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') diff --git a/activesupport/test/inflector_test_cases.rb b/activesupport/test/inflector_test_cases.rb index 481c3e835c..b7ac467c37 100644 --- a/activesupport/test/inflector_test_cases.rb +++ b/activesupport/test/inflector_test_cases.rb @@ -99,7 +99,8 @@ module InflectorTestCases "prize" => "prizes", "edge" => "edges", - "cow" => "kine" + "cow" => "kine", + "database" => "databases" } CamelToUnderscore = { |