More rails 4 compatibility