Re: Rails'' inflections are messy

Paul
Thu, 19 Jul 2012 11:53:43 -0000

I personally don''t like them at all. I wish that all the names of
controllers/routes/models were unchanged so I wouldn''t have to keep
deciding whether I needed to pluralize. I remember spending too much
time trying to straighten out a scaffold I created named "series". It
created a model named "Serie"! I shouldn''t have to spend
energy
figuring that out. It should use the exact name I give it.

On Wed, Jul 18, 2012 at 8:41 PM, davidcelis
<david-8+ab0rdVlAuDvotElmWtJA@public.gmane.org>
wrote:
> Yesterday, I opened a GitHub Issue about moving Rails inflections to an
> initializer. The idea wasn''t received well, understandably, as
generating a
> large initializer with new Rails apps is pretty unappealing. However, the
> core members seemed open to the discussion of alternatives continuing here.
>
> For those of you not in the know, inflections (the defined rules for
> singularization/pluralization) in Rails are currently frozen. What this
> means is that most pull requests submitted that add, remove, or change
> inflections are closed and not merged. The reasoning behind this is to
avoid
> breaking existing applications that depend on these inflections, even if
> they are errant. People are advised to fix (yes, fix) these inflections
> themselves in their inflections initializer.
>
> In my opinion, with a major 4.0 release coming up, inflections should be
> unfrozen and fixed/cleaned up. There is a lot that is bad in this file, and
> I don''t think fear of breaking existing apps is a good reason to
freeze
> mistakes. People should read the CHANGELOG when updating. They should read
> the upgrade guides. It''s not that hard to redefine the inflection
you need
> in that initializer, and the current inflections are based mostly around
> exceptions to grammatical rules rather than the rules themselves.
>
> If people want specifics, I''ve written a post about this:
>
>
http://davidcelis.com/blog/2012/07/18/the-current-state-of-rails-inflections/
>
> I''m curious as to what others think. I''d like to help
make this a better
> framework, and I''ve heard a lot of complaints from personal
colleagues about
> how messy the inflections are.