Sunday, December 17, 2006

Rails Singularize Fun

A friend of mine is building his first Rails application. He has been having problems with his models. Here is the error:

ArgumentError: ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:399:in `to_constant_name': Anonymous modules have no name to be referenced by


We started chatting about it around 10:30pm. At 1:50am I had an idea:

>> "niche".pluralize
=> "niches"
>> "niches".singularize
=> "nich"


His niches weren't being singularized properly. I checked genres, they work.

>> "genres".singularize
=> "genre"


Rails did not play nice today :-)

Friday, December 15, 2006

First Post!

I am posting again, but this time from a new address. I will be posting about personal and professional topics. Topics will range from my daughter's cute sayings to grumblings about how much EJB's suck. So I hope you enjoy!