updated for activesupport 3.2