fixed rails4 deprecation_warning