Things I had to fix for Rails 2.2.2

The new features in Ruby on Rails 2.2.2 have been well documented, and I’m looking forward to using several of them on If you’re reading this you probably are too.

However, if you’re upgrading an existing project and you’re sticking with official releases (as opposed to edge Rails) like I am, your code probably needs some tweaking to work with Rails 2.2.2. Mine certainly did. Although there were a lot of failed tests with ugly stacktraces, there were only a few API changes in Rails that needed to be accomodated to fix them all. Here’s a list of the changes that broke my app, and what I had to do to get it working again.
Continue reading “Things I had to fix for Rails 2.2.2”

EphemeralModel, for Rails 2.2.2 form validation without a DB table

I recently upgraded to Rails 2.2.2. I had been using advice from the Rails Wiki’s HowToUseValidationsWithoutExtendingActiveRecord page. I was using a class based on the RailsWeenie code (that site is down now) and it stopped working. Here’s a new replacement hack that works almost identically.
Continue reading “EphemeralModel, for Rails 2.2.2 form validation without a DB table”

Hiding a CLI-only user account in Mac OS X 10.5 Leopard

A year and a half ago I installed the excellent PostgreSQL via MacPorts, and had to create a user account manually. Annoyingly, this postgres user shows up in the GUI login screen and Fast User Switching menu under Leopard. I found a fix today.
Continue reading “Hiding a CLI-only user account in Mac OS X 10.5 Leopard”