# Naming Convemtion for Model?

**URL:** <https://www.ruby-forum.com/t/naming-convemtion-for-model/56007>\
**Category:** Rails\
**Created:** [March 27, 2006, 8:21am UTC](https://www.ruby-forum.com/t/naming-convemtion-for-model/56007 "2006-03-27T08:21:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tiwaripk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7ab992/32.png) [@tiwaripk](https://www.ruby-forum.com/u/tiwaripk)\
**Post date:** [March 27, 2006, 8:21am UTC](https://www.ruby-forum.com/t/naming-convemtion-for-model/56007/1 "2006-03-27T08:21:17Z")

</div>

Hi,  
In My database there is a table called “categories”. Now what name  
should I specify for my model as per ruby naming convention? Is it  
“Category”???  
Also is it possible to keep database table name singular instead of  
plural?  
Please tell me.  
Thanx in advance.  
Prash

---

<div class="post-metadata">

**Author:** ![tiwaripk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/7ab992/32.png) [@tiwaripk](https://www.ruby-forum.com/u/tiwaripk)\
**Post date:** [March 27, 2006, 8:48am UTC](https://www.ruby-forum.com/t/naming-convemtion-for-model/56007/2 "2006-03-27T08:48:42Z")

</div>

Prashant T. wrote:

> Hi,  
> In My database there is a table called “categories”. Now what name  
> should I specify for my model as per ruby naming convention? Is it  
> “Category”???  
> Also is it possible to keep database table name singular instead of  
> plural?  
> Please tell me.  
> Thanx in advance.  
> Prash

The model would be called Category.  
Then in the model you can set the name using:  
set\_table\_name “category”

Or if you want this for all models, put the following line in your  
environmen.rb:  
ActiveRecord::Base.pluralize\_table\_names = false

Joey\_\_
