rails 4 deprecation fix