Making rails 4 friendly