Full Sharh — Riyad as-Salihin 376
-وعن أبي بن كعب رضي الله عنه قال: كان رجل من الأنصار لا أعلم أحدًا أبعد من المسجد منه، وكانت لا تخطئه صلاة! فقيل له: لو اشتريت حمارًا تركبه في الظلماء وفي الرمضاء قال: ما يسرني أن منزلي إلى جنب المسجد إني أريد أن يكتب لي ممشاي إلى المسجد، ورجوعي إذا رجعت إلى أهلي، فقال رسول الله صلى الله عليه وسلم: "قد جمع الله لك ذلك كله" ((رواه مسلم)).
English Translation
Ubayy bin Ka'b (May Allah be pleased with him) reported:: There was a man of the Ansar whose house was the farthest from the mosque. As far as I know, he never missed Salat (in congregation). It was said to him: "If you buy a donkey, you may ride upon it in the dark nights and in the hot days." He said: "I do not like that my house should be situated close to the mosque. I desire that my walking towards the mosque and returning home be recorded to my credit." Upon this the Messenger of Allah (ﷺ) said, "Allah has gathered all (rewards) for you.".
Source
Riyad as-Salihin(رياض الصالحين)
The Book of Virtues
Hadith Number
376