This project is archived and is in readonly mode.

ActiveSupport - Incorrect Inflectors for "nurseries"
Reported by noddy | November 22nd, 2010 @ 11:39 PM
I'm using rails 3.0.3 and as per the longstanding policy of not taking further inflector patches, I'm using the following initializer:
ActiveSupport::Inflector.inflections do |inflect|
 inflect.irregular 'nursery', 'nurseries'
end
Plurals are working fine
>> "nursery".pluralize
=> "nurseries"
however singular isn't working properly:
>> "nurseries".singularize
=> "nurseries"
Comments and changes to this ticket
- 
            
         noddy November 23rd, 2010 @ 02:01 AMActiveSupport::Inflector.inflections do |inflect| inflect.clear :uncountables inflect.irregular 'nursery', 'nurseries' endAs the above works, I assume the problem is "series" in line 54 in rails/activesupport/lib/active_support/inflections.rb inflect.uncountable(%w(equipment information rice money species series fish sheep jeans))
- 
            
         
- 
         Piotr Sarnacki December 18th, 2010 @ 08:54 AM- State changed from new to duplicate
- Importance changed from  to Low
 I know that this was first, but the other ticket has a patch, so it will be easier to discuss there. Closing as duplicate. 
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Referenced by
- 
         6093 
          [PATCH] Uncountable singularize uses regex match while pluralize uses exact match leading leading to unexpected collisions
        #6040 deals with the same issue. 6093 
          [PATCH] Uncountable singularize uses regex match while pluralize uses exact match leading leading to unexpected collisions
        #6040 deals with the same issue.
 Jeremy Kemper
      Jeremy Kemper
 noddy
      noddy
 Piotr Sarnacki
      Piotr Sarnacki