put in master patches for rails 4