add rails 4 compatibility