Forum: Ruby on Rails scaffold suddenly pluralizing names

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eea3feaacbe44706164289d068d94828?d=identicon&s=25 Peter Michaux (Guest)
on 2006-01-15 01:58
(Received via mailing list)
I haven't updated rails today and all of a sudden scaffold is
pluralizing my names

ruby script/generate scaffold Admin::Category

produces

class Admin::CategoriesController < ApplicationController

Do I really want "CategoriesController" instead of "CategoryController"?

Thanks,
Peter
38a8230ed3d5c685558b4f0aad3fc74b?d=identicon&s=25 Joe Van Dyk (Guest)
on 2006-01-15 02:01
(Received via mailing list)
On 1/14/06, Peter Michaux <petermichaux@gmail.com> wrote:
> I haven't updated rails today and all of a sudden scaffold is
> pluralizing my names
>
> ruby script/generate scaffold Admin::Category
>
> produces
>
> class Admin::CategoriesController < ApplicationController
>
> Do I really want "CategoriesController" instead of "CategoryController"?

I think it always did that.
C8a634a01a2c4508360874bff7fb1a7f?d=identicon&s=25 Kevin Olbrich (olbrich)
on 2006-01-15 02:47
Joe Van Dyk wrote:
> On 1/14/06, Peter Michaux <petermichaux@gmail.com> wrote:
>> I haven't updated rails today and all of a sudden scaffold is
>> pluralizing my names

That is the standard behavior.  If you repeat the name again, it will
use your definition instead.

ruby script/generate scaffold Admin::Category Admin::Category

Should avoid pluralization.

_Kevin
This topic is locked and can not be replied to.