This project is archived and is in readonly mode.

#6040 ✓duplicate
noddy

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

    noddy November 23rd, 2010 @ 02:01 AM

    
    ActiveSupport::Inflector.inflections do |inflect|
      inflect.clear :uncountables
      inflect.irregular 'nursery', 'nurseries'
    end
    

    As 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))
    
  • Vijay Dev

    Vijay Dev December 17th, 2010 @ 08:38 PM

    There is a patch available in #6093

  • Piotr Sarnacki

    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