Is your Controller correct, i mean the local link "/api/users/userid" ?
Did you double check the Output of your Controller? are your reloadlink and the Ajax URL the same?
There are syntax errors in your post. You are passing the userid to your Controller, it should return the current datasets. If your reloadlink and the Destination URL in Ajax request are not the same, there must be something wrong in your Controller.
Update: for things like this, you can just use the element serialize() function for html form in jquery. more can be found under How can I get form data with JavaScript/jQuery?
<!-- remove the action and method attribut, you don't need that any more-->
<form id="ajaxsubmit">
<input name="changeme" type="text">
<input type="submit" value="save">
</form>
In JS / JQuery snippet
$('#ajaxsubmit').submit(function(event) {
// what every this is for
var user_id = this.dataset.userid
var additionalparams = $('#ajaxsubmit').serialize();
// serialize produces: "changeme=xx&foo=xxx"
$.ajax({
type: 'GET',
url: 'myhost/newrailscontroller',
data: 'user_id=' + user_id +'&' + additionalparams,
success: function(data, textStatus, jqXHR){
// do what ever you want here
listTemplate = HandlebarsTemplates['lists/list'](data);
$('#panel').html("");
$('#panel').append(listTemplate);
}
});
});
And now you just need to build a new railscontroller names "newrailscontroller" to handle the ajax get request with all of your passed parameters. and update your db with the params from your ajax request, finally call your db JSON App to return the interested data als JSON back to your ajax call. Be careful with your success-call in ajax, the json show be parsed with JSON.stringify() or Jquery.parseJSON(). more about this can be found in serialize : deserialize data structure to/from JSON
since i have programmed in almost every language, but only not in ruby. Sorry that i can't give you an example how to make a railscontroller for your case. Good luck.