Rails 4 compatibility.