rails 4 hacks, fixes