Sayyiduna Anas bin Malik (may Allah be pleased with him) said: It happened that he (peace and blessings be upon him) was travelling in Ramadan, and he (peace and blessings be upon him) fasted; and at times it happened that he (peace and blessings be upon him) was travelling in Ramadan, and he (peace and blessings be upon him) broke the fast.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 8165