Forum: Ruby on Rails RE: Rails table pluralizing Issue

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.
unknown (Guest)
on 2006-01-08 19:10
(Received via mailing list)
Hi Mark,
What exactly is the difference between
ruby script/generate scaffold Addresses Address
and
ruby script/generate scaffold Address

IF you can explain, that would be really beneficial.
Thanks
Silvy Mathews
Rick O. (Guest)
on 2006-01-08 19:19
(Received via mailing list)
On 1/8/06, removed_email_address@domain.invalid 
<removed_email_address@domain.invalid> wrote:
> Hi Mark,
> What exactly is the difference between
> ruby script/generate scaffold Addresses Address
> and
> ruby script/generate scaffold Address
>
> IF you can explain, that would be really beneficial.
> Thanks
> Silvy Mathews

If you run script/generate scaffold by itself it gives you some docs.

$ script/generate scaffold
Usage: script/generate scaffold ModelName [ControllerName] [action, ...]
...

Judging by that first line...

script/generate scaffold Address uses 'Address' as the model and uses
that to infer the controller name (AddressesController)

script/generate scaffold Address Addresses would set the controller
name explicitly.

In this case I think M Dagget has his arguments switched up.  But, you
shouldn't have to do that with Address, Rails should be able to
pluralize it correctly.  The reason you're getting Addres is something
is trying to singularize 'Address.'

--
rick
http://techno-weenie.net
This topic is locked and can not be replied to.