I’m a beginner Rails programmer and even though this question might be too easy, I love to know if it’s possible and if it is how can I accomplish that?
My question inside the index how can I make a get request to a link and assign it’s JSON response to an object that I will be later using on. The syntax(not correct) I had in my mind was something like;
people=Make_A_Get_Request("http://people.com") //It will return in JSON
@peopleName=people['name']
I know that it’s not true but is there like any method I can apply in Rails like the one above to make a get request to a link and assign its JSON response to an object in my rails function
Try something like below