Attempt compatibility with Rails 3.x