The Bodhisatta was once an ascetic who had many followers studying with him in the Himalayas. He taught them the importance of being kind and generous and explained that doing so would allow them to be reborn in heaven. And when the Bodhisatta died, he went to heaven and stayed there for seven eons.
In the Lifetime of the Buddha
One time the Buddha gave a sermon to his disciples on charity, explaining that practicing it fully can result in producing the eleven blessings: sleeping in comfort; waking in comfort; not having bad dreams; being valued by humans; being valued by non-humans1; being guarded by the gods; not being harmed by fire, poison, or weapons; being able to enter a state of concentration quickly; having a serene facial expression; dying without distress; and entering heaven after death without the need of deep insight. And when practicing charity, show kindness and sympathy to all creatures without exception. Doing this leads to rebirth in heaven. To further emphasize his lesson, the Buddha told them this story.
The Bodhisatta’s fellow ascetics were earlier births of the Buddha’s followers.