Fix compatibility with Rails4.0.0.rc1