Rubies on Rails

I had a little bit of down time last week, and decided to play around with Ruby. Specifically Ruby on Rails, which may not be the best way to get into the language, but I’ve heard a lot about it and have wanted to try it out for a while.

I haven’t had much of a chance to get into it yet, but I’ve already run across something in Rails that irks me. By default, the database tables that persist the objects are named in the plural, e.g. a table named employees for the Employee model class. Now I’m sure that the in-house Ruby apologists will tell me that I’m a dinosaur, I’ve got to get with the times, and that pluralized table names are somehow easier to understand than singular names. But try telling that to a DBA.

I’m not the only one. The current front page post on is a pointer on how to get around the pluralization default if your database table names follow the singular format. It seems to be something that a lot of people find irritating.

For the record, most people suggest doing something along these lines in your config/environment.rb file:

# Include your application configuration below
ActiveRecord::Base.pluralize_table_names = false

Aside from that little nit, I can see why people get excited about the whole Ruby thing. I’m looking forward to spending more time with it in the next few days.

It's only fair to share...
Share on Facebook
Tweet about this on Twitter
Share on LinkedIn

Leave a Reply