From the beginning of the book until roughly Chapter 25, Codi is still basically planning to run off at any minute. She hated growing up in Grace, and she doesn't want to get stuck there, so no amount of kindly grandmothers and sexy cock-fighting high school boyfriends is going to change her mind.
Act Two really starts when Codi gets roped into helping save the town from the Black Mountain Mining Company. It's the moment when she realizes that the people of Grace don't reject her. Add to that the fact that she's pretty clearly in love with Loyd, has a family with Emelina, and finally learns that she's actually as pure a specimen of the Grace, Arizona gene pool as anyone, and it looks like all Codi has to do is click her heels three times together and she'll find herself at home.
You know, until Hallie gets kidnapped and everything falls apart.
Codi abandons Loyd, Emelina, her job, and Grace, and runs away. But then an airplane malfunction sends Codi back to Grace, where she finds herself wrapped in the loving arms of her man, and she lives happily ever after.