addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1launch-new-window--smalllight-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Re: [ruby-81] I hate pluralization!

From: Loqi
Sent on: Tuesday, January 29, 2008 12:42 PM
This pluralization thing is hardly a minor annoyance for me. My code 
won't run now, because I'm trying to go RESTful.

When I first started using Rails, I just went along with the 
pluralization regime because I figured it was thought through by 
people who are smarter than I, and there must be some good reason for 
it. But after a while, it annoyed me more and more, so i lobotomized 
my inflector (see original message). This was unbelievably 
liberating. Now I get all the good parts of Rails, that is, 
EVERYTHING EXCEPT mandatory code pluralization, with none of the bad 

I use this naming convention:
1. All identifiers are singular in all contexts.
2. That is all.

Everything was back on track until I started going RESTful. Rails 
RESTful routing appears to rely on each identifier having two 
distinct spellings for singular and plural forms in order to 
function. I consider this a bug, not a desirable condition. I can 
only hope the Rails team would agree that relying on an artifact of 
the English language in order to keep your code from crashing is a 
brittle solution.

I don't know how to fix this, so I'm at a standstill. I'm facing a 
decision to either re-write all my code to be pluralization-compli­ant 
(and gargle with mouthwash every time I sit down at my keyboard and 
submit to this), or abandoning the RESTful services.

On second thought, I will NEVER submit to pluralization. I'd sooner 
code in PHP.

>Let the routes dictate the mapping. Viva la revolution!

Does that mean there's some kind of movement to abolish forced pluralization?

To the Bastille!

I want my code back.

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy