Restore compatibility with Rails 3.2