Fix a deprecation in Rails 4.2