# Weird table pluralization problem

**URL:** <https://www.ruby-forum.com/t/weird-table-pluralization-problem/99272>\
**Category:** Rails\
**Created:** [July 21, 2006, 12:42pm UTC](https://www.ruby-forum.com/t/weird-table-pluralization-problem/99272 "2006-07-21T12:42:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![schmurfy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@schmurfy](https://www.ruby-forum.com/u/schmurfy)\
**Post date:** [July 21, 2006, 12:42pm UTC](https://www.ruby-forum.com/t/weird-table-pluralization-problem/99272/1 "2006-07-21T12:42:07Z")

</div>

When I created a new project and a “equipment” model for an unknown  
reason to me rails tried to query the table “equipment” and not  
“equipments”, does someone know why it did that ?

So I added  
set\_table\_name “equipments”  
in the model class and it now works but I don’t really understand why it  
is required in the first place…

---

<div class="post-metadata">

**Author:** ![schmurfy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@schmurfy](https://www.ruby-forum.com/u/schmurfy)\
**Post date:** [July 21, 2006, 12:49pm UTC](https://www.ruby-forum.com/t/weird-table-pluralization-problem/99272/2 "2006-07-21T12:49:08Z")

</div>

I think the plural of “equipment” in English is identical to the  
singular.

Either that or “equipment”, like “water”, doesn’t really have singular.

---

<div class="post-metadata">

**Author:** ![schmurfy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@schmurfy](https://www.ruby-forum.com/u/schmurfy)\
**Post date:** [July 21, 2006, 1:36pm UTC](https://www.ruby-forum.com/t/weird-table-pluralization-problem/99272/3 "2006-07-21T13:36:07Z")

</div>

Alder G. wrote:

> I think the plural of “equipment” in English is identical to the  
> singular.
> 
> Either that or “equipment”, like “water”, doesn’t really have singular.

Too bad I didn’t even thought of that :x  
thanks for your answer ^^

---

<div class="post-metadata">

**Author:** ![schmurfy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@schmurfy](https://www.ruby-forum.com/u/schmurfy)\
**Post date:** [July 21, 2006, 1:52pm UTC](https://www.ruby-forum.com/t/weird-table-pluralization-problem/99272/4 "2006-07-21T13:52:22Z")

</div>

In the inflections file (the file which determins singular and plural  
names… on my computer it is  
ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/inflections.rb)  
there is a line like this:

inflect.uncountable(%w(equipment information rice money species series  
fish sheep))

So there you go. Equipment is one of the words that rails doesn’t give  
a plural for.

-Nathan

---

<div class="post-metadata">

**Author:** ![schmurfy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@schmurfy](https://www.ruby-forum.com/u/schmurfy)\
**Post date:** [July 21, 2006, 2:52pm UTC](https://www.ruby-forum.com/t/weird-table-pluralization-problem/99272/5 "2006-07-21T14:52:15Z")

</div>

On 7/21/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> In the inflections file (the file which determins singular and plural  
> names… on my computer it is  
> ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/inflections.rb)  
> there is a line like this:
> 
> inflect.uncountable(%w(equipment information rice money species series  
> fish sheep))

Yeah, that’s the proper name for stuff like “equipment” and “water” :  
Uncountable nouns.

Interesting that some Railers need Sheep, Fish and Rice models. Why  
would they document attributes of specific sheep? What’s to document,  
even? (:name =\> ‘dolly’?)
