It's not a secret anymore!
The moose likes Other Languages and the fly likes singular or plural names Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "singular or plural names" Watch "singular or plural names" New topic

singular or plural names

Suganya Ram

Joined: Jun 12, 2008
Posts: 18
When should I use singular or plural names
Why does Rails do pluralization

Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Originally posted by Suganya Ram:
When should I use singular or plural names?

When appropriate.

Originally posted by Suganya Ram:
Why does Rails do pluralization?

Because it's more natural to talk about "an account" when you're referring to an object and "accounts" when you're talking about the database table that those objects are stored in. It just makes sense.

In fact, I can't remember anyone suggesting that we should name the database table as "account" in such a scenario. The Rails developers have just made that universal default a default in the framework, too. If you don't like that default, you can override it (but things are a lot easier if you follow the convention).

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link:
subject: singular or plural names
It's not a secret anymore!