revert rails 4 changes

revert rails 4 changes