Using jQuery sortable, you just need to either
- serialize the sortable to a hidden input after each change or in the onSubmit part of your form
- serialize the sortable on submit via your jQuery $.post
This will provide you with a param like so: {"item"=>["2", "3", "4", "5", "6", "1", "7"]}
Some examples to get you started:
Example onSubmit (in this case, your order is serialized to params[:serialized_form]):
<FORM ACTION=".." NAME="testform"
onSubmit="$('#serialized_form').value = $('#sortable').sortable('serialize')">
<INPUT TYPE="hidden" id="serialized_form" value="">
...
Example $.post:
$.post("/", $('#sortable').sortable('serialize'), function(ret){
// whatever you want to do with the outcome here.
});