fix rails 4 support