Skip to content
This repository
Browse code

Fixed inflection of perspectives and similar words #1045 [thijs@vande…

…rvossen.net]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1101 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 38a0b5b427371b53c0d0f159cf5b3806f16aab30 1 parent 808d76a
David Heinemeier Hansson authored
2  activesupport/CHANGELOG
... ...
@@ -1,5 +1,7 @@
1 1
 *SVN*
2 2
 
  3
+* Fixed inflection of perspectives and similar words #1045 [thijs@vandervossen.net]
  4
+
3 5
 * Added Fixnum#even? and Fixnum#odd?
4 6
 
5 7
 * Fixed problem with classes being required twice. Object#const_missing now uses require_dependency to load files. It used to use require_or_load which would cause models to be loaded twice, which was not good for validations and other class methods #971 [Nicholas Seckar]
1  activesupport/lib/active_support/inflector.rb
@@ -81,6 +81,7 @@ def singular_rules #:doc:
81 81
         [/(s)eries$/i, '\1\2eries'],
82 82
         [/([^aeiouy]|qu)ies$/i, '\1y'],
83 83
         [/([lr])ves$/i, '\1f'],
  84
+        [/(tive)s$/i, '\1'],
84 85
         [/([^f])ves$/i, '\1fe'],
85 86
         [/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i, '\1\2sis'],
86 87
         [/([ti])a$/i, '\1um'],
8  activesupport/test/inflector_test.rb
@@ -57,12 +57,14 @@ class InflectorTest < Test::Unit::TestCase
57 57
     "old_news"    => "old_news",
58 58
     "news"        => "news",
59 59
     
60  
-    "series"      => "series"
  60
+    "series"      => "series",
  61
+
  62
+    "perspective" => "perspectives"
61 63
   }
62 64
 
63 65
   CamelToUnderscore = {
64  
-    "Product"                       => "product",
65  
-    "SpecialGuest"                  => "special_guest",
  66
+    "Product"               => "product",
  67
+    "SpecialGuest"          => "special_guest",
66 68
     "ApplicationController" => "application_controller"
67 69
   }
68 70
   

0 notes on commit 38a0b5b

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