Mongoid doesn't update position field
问题 I want to be able update Attachinary::File position field I use ruby 2.5.0, rails 5.2.2, mongoid, 'jquery-ui-rails' and custom Attachinary (https://github.com/ipatovanton/attachinary/tree/position) for images upload. application.js jQuery(function() { $(document).on('turbolinks:load', function(){ $('.attachinary-input').attachinary() $("#images").sortable({ update: function(e, ui) { Rails.ajax({ url: $(this).data("url"), type: "PATCH", data: $(this).sortable('serialize'), }); } }); }); })