Reworked for Rails 3.0

for those poor souls like me who still have to work in it...