兼容rails3