How to not pluralize in rails 2.1?

For some reason I need to generate scaffolds but I don´t want the name
to be pluralized, is there any way to do it ?

in config/environment.rb you can specify pluralization rules for the
Inflector class. Check out activesupport/inflector.rb.

Best.
Mike

Adriano L. wrote:

For some reason I need to generate scaffolds but I don´t want the name
to be pluralized, is there any way to do it ?

By “generate” you must mean “rubber-stamp out some code”. (But note that
some “scaffolds” don’t do that…)

After rubber stamping, and before the first integration,
search-and-replace
the names to what you need.

If you need to match a legacy database, read /Rails Recipes/, and add
code
to your models that override the automatic table name.


Phlip

simpler than that just ruby script/generate scaffold name to generate
name and not names =D

Phlip wrote:

By “generate” you must mean “rubber-stamp out some code”. (But note that
some “scaffolds” don’t do that…)