fix deprecation warning with rails 4.1