A homeless dog was rescued — and that’s when something magical happened