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.
Peter M. (Guest)
on 2006-01-15 02: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
Joe Van D. (Guest)
on 2006-01-15 03:01
(Received via mailing list)
On 1/14/06, Peter M. <removed_email_address@domain.invalid> 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.
Kevin O. (Guest)
on 2006-01-15 03:47
Joe Van D. wrote:
> On 1/14/06, Peter M. <removed_email_address@domain.invalid> 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.