Fixed Rails4 deprecation warning.