I am making a webb app using rails. At one point I am sending a request to the server to get some information in an array. I can handle the request on the server side, using routing and controllers properly. But once the server has done its math, I don't know how to send a reply back to the front end.
How do you send information back to the front end using rails?
Once the server has done its math (in the controller), you can return your array like the below:
You can also have the response in different formats..