for rails3 still use condition