# how to not pluralize in rails 2.1 ?

**URL:** <https://discuss.rubyonrails.org/t/how-to-not-pluralize-in-rails-2-1/31376>\
**Category:** rubyonrails-talk\
**Created:** [July 3, 2008, 11:58am UTC](https://discuss.rubyonrails.org/t/how-to-not-pluralize-in-rails-2-1/31376 "2008-07-03T11:58:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [July 3, 2008, 11:58am UTC](https://discuss.rubyonrails.org/t/how-to-not-pluralize-in-rails-2-1/31376/1 "2008-07-03T11:58:07Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![Hardbap](https://avatars.discourse-cdn.com/v4/letter/h/c89c15/32.png) [@Hardbap](https://discuss.rubyonrails.org/u/Hardbap)\
**Post date:** [July 3, 2008, 12:35pm UTC](https://discuss.rubyonrails.org/t/how-to-not-pluralize-in-rails-2-1/31376/2 "2008-07-03T12:35:09Z")

</div>

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

Best. Mike

---

<div class="post-metadata">

**Author:** ![Phlip](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@Phlip](https://discuss.rubyonrails.org/u/Phlip)\
**Post date:** [July 3, 2008, 1:27pm UTC](https://discuss.rubyonrails.org/t/how-to-not-pluralize-in-rails-2-1/31376/3 "2008-07-03T13:27:12Z")

</div>

Adriano Lul 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.

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [July 3, 2008, 1:31pm UTC](https://discuss.rubyonrails.org/t/how-to-not-pluralize-in-rails-2-1/31376/4 "2008-07-03T13:31:38Z")

</div>

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

Phlip wrote:
