Topic: Simple but only marginally useful tip
Ever have problems when counting items and keeping track of the whether or not the word use should be plural?
For instance lets say you have some social networking site that notifies you if you have any messages, sometimes it will say something like "you have 1 messages waiting to be read." I really hate that.
Try adding this code to your one of your controller helpers.
number != 1 ? plural : singular
Pass it the singular form and plural forms of whatever it is you are counting, and the number of the items being counted. It will return the singular when there is one item, and plural in all other cases (remember that if there are zero items it should be plural).
Like I said, only marginally useful, but I had to post this since I always get irritated when a website gets this wrong.