Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
muslim:694f[Chain 1] Yaḥyá b. Ḥabīb > Khālid / Ibn al-Ḥārith [Chain 2] Ibn al-Muthanná > ʿAbd al-Ṣamad

He prayed while travelling.  

مسلم:٦٩٤fوَحَدَّثَنَاهُ يَحْيَى بْنُ حَبِيبٍ حَدَّثَنَا خَالِدٌ يَعْنِي ابْنَ الْحَارِثِ ح وَحَدَّثَنَا ابْنُ الْمُثَنَّى قَالَ حَدَّثَنِي عَبْدُ الصَّمَدِ قَالاَ

حَدَّثَنَا شُعْبَةُ بِهَذَا الإِسْنَادِ وَلَمْ يَقُولاَ فِي الْحَدِيثِ بِمِنًى وَلَكِنْ قَالاَ صَلَّى فِي السَّفَرِ