make it work with rails 4
make it work with rails 4, probably break the compatibility with rails 3