Analia Alvar

Joined

10 Experience
0 Lessons Completed
0 Questions Solved

Activity

Posted in Sortable Drag and Drop Discussion

The same was happening to me when using Rails.ajax(), I found this online and now it works:
$("#sections").sortable({
update: function(e, ui) {
Rails.ajax({
dataType: 'script',
url: $(this).data("url"),
type: "PATCH",
beforeSend: function() {
return true
},
data: $(this).sortable('serialize'),
});
}
});