A generalization of Ramsey theory for linear forests