hack for the rails 4