This project is archived and is in readonly mode.
Inflections for uncountables works badly for "funky jeans"
-
Rolf Bjaanes
- Tag changed from inflection, inflections, uncountable to 2-3-stable, 3-0, inflection, inflections, uncountable
-
Rolf Bjaanes
The patch done to /activesupport/lib/active_support/inflections.rb may be disregarded.
And the patch fixes some issues with nested urls which could turn into "admin_jean".This is especially true for 2-3-stable which does a underscore on routes before doing singularize.
-
Rizwan Reza
- Tag changed from 2-3-stable, 3-0, inflection, inflections, uncountable to 2-3-stable, inflection, inflections, uncountable
-
José Valim
- State changed from new to wontfix
It has been a long time since Rails does not add any extra inflection (you can see other tickets in LH were already rejected). You should define this one in your application.
-
Rolf Bjaanes
Point wasn't adding the extra inflection itself, but that funky jeans was singularized to funky jean – which at the moment held true for any uncountable with based on two or more words :)
-
José Valim
- Milestone set to 2.x
- State changed from wontfix to open
- Assigned user set to José Valim
Oh, my bad. I'm assigning it to me and I will apply it later!
-
Rolf Bjaanes
- Assigned user cleared.
No problems :)
I see the same code is used / unpatched in master, so you might want to see if it should go there too?
-
Rolf Bjaanes
Oh, it said milestone 2.x
Btw, I can't think of many cases other than "jeans" and "[put word here] jeans" it'll be applicable, but
atleast it won't try to singularize if people supply "a pair of scissors" and scissors is in the uncountables :)Besides, look! There are tests! :)
-
Repository
- State changed from open to resolved
(from [4eab983b955fe17cf02c6fe96cab1c8a309cd606]) Changed the way inflections for uncountables work for 'funky jeans' [#3576 Inflections for uncountables works badly for "funky jeans" state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/4eab983b955fe17cf02c6fe96cab1c... -
José Valim
- State changed from resolved to open
Hey mate, I could not apply the patch in 2-3-stable branch. Can you please rebase it? Thanks!
-
Rolf Bjaanes
I'll find time for it tomorrow or the day after.
Crazy busy changing apartments :)Thanks btw :)
This feel good. -
Rolf Bjaanes
A bit later than expected, but here it is.
Patch with tests attached. -
José Valim
- State changed from open to committed
