When every pure ideal is projective