add rails 3 compatibility