version used: 1.5.1_rc2
Repro:
Make a Ajax request and set parameters to string like so...
var pars = "term=&active=Yes&type=Regular";
var tmp = new Ajax.Request(
url,
{ method: 'post',
parameters: pars,
onSuccess: this.saveXml.bind(this),
onFailure: onError
});
When the request is actually made the params look like this:
"active=Yes&type=Regular"
(term is missing)
This behavior did not exist in 1.5.0
Was able to resolve the problem by removing line 793
original:
Hash.toQueryString.addPair = function(key, value, prefix) {
if (value == null) return;
key = encodeURIComponent(key);
this.push(key + '=' + (value == null ? '' : encodeURIComponent(value)));
}
modified:
Hash.toQueryString.addPair = function(key, value, prefix) {
key = encodeURIComponent(key);
this.push(key + '=' + (value == null ? '' : encodeURIComponent(value)));
}