This project is archived and is in readonly mode.
'Address' does not singularize properly
Reported by Christopher Thompson | November 24th, 2010 @ 05:25 PM
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.
Comments and changes to this ticket
-
Ryan Baldwin November 25th, 2010 @ 03:43 PM
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.
-
Andrés Mejía November 25th, 2010 @ 04:41 PM
From ticket 2399:
"Rails has a longstanding policy of not taking further inflector patches."
May I ask what is the reason behind this?
-
Aditya Sanghi November 27th, 2010 @ 09:25 AM
- 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
-
Aditya Sanghi November 27th, 2010 @ 09:27 AM
@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.
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
- 2399 Incorrect inflectors for 'business' or '*ness' In ticket #6057, Andrés Mejía asked: