attempt to make rails 3 compatible