CF assignment for performance in rails