Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActiveSupport - Incorrect Inflectors for "nurseries"

#6040

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"

Reported by noddy · November 22nd, 2010 @ 11:39 PM

State: duplicate
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. noddy
    noddy
    
    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))
    

    November 23rd, 2010 @ 02:01 AM

  2. Vijay Dev
  3. Piotr Sarnacki
    Piotr Sarnacki
    • 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.

    December 18th, 2010 @ 08:54 AM