I have a Sinatra app and I'm updating some stuff in a mongoDB database with some PUT-requests.
In javascript, the actual values I'm posting are:
entity: {
config: someString,
parameters: parameterArray, // EMPTY [ ]
dt: dtArray, // EMPTY [ ]
}
I'm doing this via jQuery ajax.
On the server side I get the following:
params[:entity] #=> config = someString
But the empty arrays are missing. Why is this? I need them! The same route will handle both empty arrays and no parameter at all in a different way...