make gem compatible with Rails 3.1.x