In the end, New York Giants receiver Odell Beckham Jr. might have found his happy ending in terms of his new lucrative five-year contract extension, but there were certainly times when the path to the bag o’ riches wasn’t always straight.

Beckham’s bumpy ride toward lifetime riches has been well documented, with perhaps the biggest of the bumps being his season-ending ankle injury suffered last year followed by some unprofessional outbursts on the field, such as his simulating a urinating dog in the end zone after scoring a touchdown in a losing effort to the Eagles.

Fortunately for Beckham, the arrival of head coach Pat Shurmur has helped the 25-year-old receiver gain a new perspective on what’s important in life and how to get there.

In fact, since Shurmur arrived at the Giants and began building his relationship with Beckham, the receiver’s time in the spotlight has been mostly for the right reasons such as holding youth football camps and playing catch with young children before Giants games.

“I think that’s a good point,” Giants COO John Mara said when asked about the role Shurmur has played in helping Beckham cut back on the histrionics while retaining his passion.

“He and Pat, I think, were on the same page from the beginning,” Mara added, noting that the decision regarding whether to play Beckham in the preseason was one that Beckham and Shurmur arrived at together.

“I think the thing that impressed Pat so much was the attitude and energy level that he came in with.”

Shurmur, as he’s done before, downplayed his role in helping Beckham take that next step forward as a football player and as an adult.

“He certainly is an outstanding player and he’s going to help us win games and so I just wanted to get to know him like I did with the other players,” Shurmur said Tuesday.

“You’ve heard me say it before, we’re here as coaches to help the players be the best they can be. Part of that starts by understanding who they are as players.”

When it came to Beckham, Shurmur’s attempt to get to know his star player included a personal visit to the receiver’s home in Los Angeles, where he spends part of his offseason training.

That trip, which coincided with a pre-draft scouting trip, apparently helped get the relationship with Beckham off on the right foot.

“Since the day we were in LA and we met up early in the morning -- I drove out there to see him -- and just from the minute we sat down and talked even knowing when we hired him,” Beckham said when asked how much of a role Shurmur’s calm presence has had in keeping the receiver focused while the contract situation played out.

“I had asked (Vikings receiver Stefon Diggs) and those other guys about him and just the relationship we’ve been able to build has been really amazing for me.”

Beckham fondly compared his relationship with Shurmur to another one he considers key in his development as a person.

“It kind of reminds me of the relationship I had with my high school coach, who is somebody I still talk to this day, a guy who taught me to be a man and do these things,” Beckham said.

“So the relationship that we have is very good. I love everything he’s done since he’s walked in the building and I’m just happy to be a part of it.”

While Shurmur keeps the specifics with his players private, one of the several lessons he’s o doubt shared with the receiver is to play with controlled passion.

“We all need to control our bodies and our minds,” Shurmur said.

“We talk about that with the players constantly, making sure they keep their composure. There’s a real fine line from being competitive and then crossing that line. He’s no different than any other player and we all wrestle with it as competitors.”

He then smiled and admitted, “When I was a player, I was involved in a fight or two myself, so I understand mentally how that plays out.”

Beckham will be the first to admit he’s not perfect and that his maturation process still has some ways to go.

But with Shurmur there to guide him through the challenges that come with being a professional football player in one of the largest media markets in the country, the outlook is bright.

“I’m growing up,” Beckham said. “I’m able to take everything that’s happened for me and make myself into a man and learn from those mistakes and be able to look myself in the mirror and have to deal with those things.”