The creation of ionized tail rays in comets