From bdb1393cad966646a855fb43f9d5a9781daa2e74 Mon Sep 17 00:00:00 2001 From: Jiri Zajpt Date: Wed, 11 Feb 2009 17:27:38 +0100 Subject: [PATCH] Adding inflection of databases. --- activesupport/lib/active_support/inflections.rb | 1 + 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 b6d2769..8fb3fa9 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 481c3e8..b7ac467 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 = { -- 1.6.1.2