make rails 4 compatible