RE: Rails table pluralizing Issue

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

On 1/8/06, [email protected] [email protected] 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