Re: Re: Rails'' inflections are messy

davidcelis
Mon, 30 Jul 2012 04:34:11 -0000

Agreed on all counts. I don''t think pluralization needs to go anywhere.
I
think the resourceful routes and controller names are more representative
of what''s going on. I just think the pluralization rules need to be
cleaner
and that the backwards compatibility excuse doesn''t work so well for a
major 4.0 release.

On Sunday, July 29, 2012 9:32:01 AM UTC-7, Matt Jones
wrote:
>
>
>
> On Saturday, 28 July 2012 10:21:23 UTC-4, paulie wrote:
>>
>> I just ran into this again. I attempted to call a model
"Media", and
>> the scaffold decided that I meant "Medium", which is NOT a
newspaper;
>> it''s someone who has a seance.
>
>
> Not to be a jerk, but you''re wrong:
>
> http://en.wiktionary.org/wiki/media#Etymology_2
>
>
>
>> As I often do in that situation, I
>> deleted those files and changed the name to "MediaOutlet" so
it would
>> act predictably.
>>
>
>  And as a side effect, got a model name that makes it *way* easier to
> understand what you''re actually representing. Until you clarified
it, my
> first guess was going to be that ''Media'' was a class
representing an
> audio/video/image file.
>
> Here''s what would be nice to happen:
>>
>> model: Media
>> controller: media_controller
>> route: /media, media_path, media_new_path, etc...
>> params: params[''media''][''etc'']
>>
>> That beats having to call pluralize and singularize all the time and
>> try to keep it straight.
>
>
> For bonus points, how would the new behavior distinguish between the
> ''show'' and ''index'' actions? (currently
plural-with-no-args vs.
> singular-with-one-arg)
>
> I suspect you''re going to face a lot of pushback from all the
developers
> who *have* managed to "keep it straight", since your suggestion
involves
> breaking every one of their applications.
>
> --Matt Jones
>

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit