fix rails 4.1 and drop support for old versions