Fix a rails 4 deprecation