make rails 3 compatible