diff options
author | José Valim <jose.valim@gmail.com> | 2012-05-16 23:36:03 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-05-16 23:36:03 -0700 |
commit | 6057a1d9d2522e27e8c9f2f44aab8cd2815f24da (patch) | |
tree | b0fe17f5877ba99cdc9606710cc57c141a9125bc | |
parent | 47971a1eb586167f2c039849cbccfdebcea4241d (diff) | |
parent | bc51ad957a22a7326a6d723cd75bbc97cbeaa0f6 (diff) | |
download | rails-6057a1d9d2522e27e8c9f2f44aab8cd2815f24da.tar.gz rails-6057a1d9d2522e27e8c9f2f44aab8cd2815f24da.tar.bz2 rails-6057a1d9d2522e27e8c9f2f44aab8cd2815f24da.zip |
Merge pull request #6356 from andhapp/fix-bug-with-inflections
Fix an issue with inflection
-rw-r--r-- | activesupport/lib/active_support/inflections.rb | 2 | ||||
-rw-r--r-- | activesupport/test/inflector_test_cases.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/inflections.rb b/activesupport/lib/active_support/inflections.rb index 7eb61cd1a0..c04c2ed15b 100644 --- a/activesupport/lib/active_support/inflections.rb +++ b/activesupport/lib/active_support/inflections.rb @@ -26,7 +26,7 @@ module ActiveSupport inflect.singular(/(ss)$/i, '\1') inflect.singular(/(n)ews$/i, '\1ews') inflect.singular(/([ti])a$/i, '\1um') - inflect.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i, '\1\2sis') + inflect.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i, '\1sis') inflect.singular(/(^analy)(sis|ses)$/i, '\1sis') inflect.singular(/([^f])ves$/i, '\1fe') inflect.singular(/(hive)s$/i, '\1') diff --git a/activesupport/test/inflector_test_cases.rb b/activesupport/test/inflector_test_cases.rb index 4d10cfca25..9fa1f417e4 100644 --- a/activesupport/test/inflector_test_cases.rb +++ b/activesupport/test/inflector_test_cases.rb @@ -47,6 +47,7 @@ module InflectorTestCases "medium" => "media", "stadium" => "stadia", "analysis" => "analyses", + "my_analysis" => "my_analyses", "node_child" => "node_children", "child" => "children", |