Rails4 compatibility.