Make Rails4 compatible