Rails4 compatibility