For rails 4.0