This project is archived and is in readonly mode.
Incorrect inflectors for 'business' or '*ness'
I'm using activesupport 2.3.2, and found a simple inflector error.
>> require "activesupport" => true >> "business".singularize => "busines" >> "madness".singularize => "madnes"
But plurals and handled nicely.
>> "business".pluralize => "businesses" >> "madness".pluralize => "madnesses"
Comments and changes to this ticket
- Tag set to activesupport, inflections, inflector
Paulo you're right. I've found that singular words ending in 'ess' like:
business, address, express, dress, press
are singularized wrongly since the current inflections do not contain a proper rule. I propose to include such rule, that you can find attached along with tests.
"address".singularize => "addres" "address".classify => "Addres"
After patch "Address"
"address".singularize => "address" "address".classify => "Address"
thank you for your response. In case of erratic behaviour of the inflector,
that's enough to add a rule to the inflector initializer and stay neat and
Just for clarity, the problem raised by Paulo will be solved by adding the
ActiveSupport::Inflector.inflections do |inflect|
to the file:
In ticket #6057, Andrés Mejía asked:
"Rails has a longstanding policy of not taking further inflector patches."
May I ask what is the reason behind this?
I'd also like to know the answer for this. I can imagine that patches tend to break other cases, so maybe that's the reason. But for such a long-standing problem that affects Rails 2.3.x and 3.x, I'm surprised to still see this as an issue.
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>