I was working today on my storyengine / storykeeper / narrator codebase when I hit a snag. Storyengine converts text to XML and embeds in into a database. Storykeeper is a little rails program that I use to make sure all my keywords and so forth are set up correctly. And narrator is le grand engine; whenever you read a story from my website, it's been pulled out of the database by narrator.
This code has been undergoing a bit of a rehash over the past month, and I slammed into a headache. ActiveRecord doesn't like the word "series." I liked the word series and didn't want to give it up; it describes the whole of a work. Rails depends upon distinguishing between the singular and the plural of something, and the plural of series is, uh, "series."
I tried "set" instead, thinking it a poor second, but then the SQL engine died, telling me that set was a reserved word. I finally settled on "serial" for the singular and "series" for the plural, but that meant I had to argue with the inflector, which meant that after active_record was loaded with require, I had to:
Inflector.inflections do |inflect| inflect.irregular 'serial', 'series' end
And everything almost worked There was one inflection that didn't, which was very odd. (This is Rails 2.0.2). But it was kind-of annoying that this little compromise wasn't available from the beginning.