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.

'Address' does not singularize properly

#6057

Using Rails 2.3.5 or Rails 3.0.3, testing in irb:

'Address'.singularize
=> "Addres"

However, the following works:

'Address'.pluralize.singularize
=> "Address"

Note that this also means that 'Address'.classify fails, while 'Address'.pluralize.classify will work properly.

Reported by Christopher Thompson · November 24th, 2010 @ 05:25 PM

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

Activity

  1. Ryan Baldwin
    Ryan Baldwin

    See ticket 2399 - it looks like this is a well known issue for words ending in double s. A comment on the ticket explains how to address the problem.

    November 25th, 2010 @ 03:43 PM

  2. Andrés Mejía
    Andrés Mejía

    From ticket 2399:

    "Rails has a longstanding policy of not taking further inflector patches."

    May I ask what is the reason behind this?

    November 25th, 2010 @ 04:41 PM

  3. Aditya Sanghi
    Aditya Sanghi
    • State changed from new to wontfix
    • Importance changed from to Low

    Closing ticket as wontfix. Please fix inflections in your app's config/initializers/inflections.rb file

    November 27th, 2010 @ 09:25 AM

  4. Aditya Sanghi
    Aditya Sanghi

    @Andrés

    The reason behind this is that Rails core does not aim to become a definitive source of english inflections and source of grammatical debates. Rails provides users to manage their own inflections as they see fit in their app's initializers/inflections.rb file.

    November 27th, 2010 @ 09:27 AM

  5. bingbing