# Pluralization of non-noun names

**URL:** <https://www.ruby-forum.com/t/pluralization-of-non-noun-names/60372>\
**Category:** Rails\
**Created:** [May 12, 2006, 7:04pm UTC](https://www.ruby-forum.com/t/pluralization-of-non-noun-names/60372 "2006-05-12T19:04:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unebaguettesvp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/47e85d/32.png) [@unebaguettesvp](https://www.ruby-forum.com/u/unebaguettesvp)\
**Post date:** [May 12, 2006, 7:04pm UTC](https://www.ruby-forum.com/t/pluralization-of-non-noun-names/60372/1 "2006-05-12T19:04:02Z")

</div>

People,

I have an insurance company client and for the last eleven years I have  
wanted to completely redevelop their system from scratch. However, the  
boss has never been interested in hiring a team to develop the new  
system (partly because of the cost and partly because of some famous and  
expensive development failures in the industry) and has always insisted  
on incremental development of the old system. Needless to say, this has  
constrained implementation of new technologies/features etc (not to  
mention making maintenance and development of the existing system more  
difficult).

I am now convinced that RoR could actually do the redevelopment job with  
only a slight expansion to our existing development team and at a cost  
that would not be much more than our usual developer costs. There are  
however a few problems, the most obvious that I can see is the  
pluralization thing. I could change the existing “policy” table to  
“policies” with no drama but the are a number of related tables ie:

p\_2quot  
p\_addr  
p\_cc  
p\_cs  
p\_direct  
p\_div  
p\_exss  
p\_ll  
p\_mp  
p\_note  
p\_prop  
p\_prov  
p\_rent  
p\_rnwl  
p\_sdiv  
p\_seq  
p\_wrkrs  
p\_xaddr

Each policy may or may not have a corresponding record in one of these  
other tables - if it does it could be a one-to-many or a one-to-one  
relationship. Is there a way to create new nouns in RoR so that I could  
create plurals like:

p\_2quots  
p\_addrs  
p\_ccs  
.  
.  
etc

and the system would work as normal?

Thanks,

## Phil.

Philip R.

Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275)  
GPO Box 3411  
Sydney NSW 2001  
Australia  
Mobile: +61:(0)411-185-652  
Fax: +61:(0)2-8221-9599  
E-mail: removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![unebaguettesvp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/47e85d/32.png) [@unebaguettesvp](https://www.ruby-forum.com/u/unebaguettesvp)\
**Post date:** [May 12, 2006, 9:14pm UTC](https://www.ruby-forum.com/t/pluralization-of-non-noun-names/60372/2 "2006-05-12T21:14:29Z")

</div>

Why not just disable table pluralization? Do that by adding the  
following  
line to ‘config/environment.rb’:

ActiveRecord [http://dev.radrails.org/trac/wiki/ActiveRecord](http://dev.radrails.org/trac/wiki/ActiveRecord)::  
Base.pluralize\_table\_names = false

According to good database design, database table names should not be  
pluralized anyway. Disabling pluralization is first thing I do when  
starting  
a new Rails project, and you can then forget about adding irregular  
inflections or incorrect noun pluralization. A bonus side effect is that  
you  
never have to worry about table name conflicts with engines or plugins,  
because the add-in tables will remain pluralized, indicating they are  
not  
part of your core application.

Daniel Butler

> **[Yup Online Math Tutoring Service - Math Tutoring Website](https://yup.com)**
>
> Yup is your math teacher multiplier. We provide secure access to
> expert math tutors 24/7, powering High-Dosage Tutoring in and out of the
> classroom. Our "Math Learning Support System" gives teachers extra capacity,
> actionable data, and is...

---

<div class="post-metadata">

**Author:** ![unebaguettesvp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/47e85d/32.png) [@unebaguettesvp](https://www.ruby-forum.com/u/unebaguettesvp)\
**Post date:** [May 13, 2006, 3:35pm UTC](https://www.ruby-forum.com/t/pluralization-of-non-noun-names/60372/3 "2006-05-13T15:35:29Z")

</div>

David,

OK, thanks for the useful points but then I presume I have to do  
manually what would normally be done automatically? eg

table: policies  
-\> Policies  
-\> Policy  
-\> policy

in appropriate places?

Regards,

Phil.

On Fri, 2006-05-12 at 15:14 -0400, Daniel Butler wrote:

> engines or plugins, because the add-in tables will remain pluralized,  
> wanted to completely redevelop their system from  
> (not to  
> however a few problems, the most obvious that I can see is the  
> p\_div  
> p\_wrkrs  
> p\_2quots  
> Phil.
> 
> ```
> _______________________________________________ 
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails 
> 
> ```

–  
Philip R.

Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275)  
GPO Box 3411  
Sydney NSW 2001  
Australia  
Mobile: +61:(0)411-185-652  
Fax: +61:(0)2-8221-9599  
E-mail: removed\_email\_address@domain.invalid
