Using JSON input in Ruby method on Rails
- by Zachary
I am using jQuery to make an AJAX call to a ruby method in my controller. The javascript looks something like this:
var latLongJSON =
{
"address": [
{"lat" : 50,
"long" : 50} ]
};
var returnedAddresses;
$.ajax({
type: "GET",
data: latLongJSON,
url: "map/getaddresses",
…