Closed nik-kg closed 6 years ago
There were some changes in parsing parameters process on SortableController
.
6f743638ce3777cf7c2300aa22eb2371956a414c
You don't have to define a sortable function on your way like NewSortable
, because this plugin provides you the $.fn.railsSortable
.
Please try this.
$(function() {
$('.sortable').railsSortable();
});
@itmammoth I'm sorry. Forget to say about this: i define it in my view:
<div class="sortableTeams">
<% @teams.order(:position).each_with_sortable_id do |team, sortable_id| %>
<div class="team-one" id="<%= sortable_id %>">
[.....]
<script type="text/javascript">
$(document).ready(function() {
$('.sortableTeams').NewSortable();
});
</script>
Please use railsSortable
,
//= require jquery-ui/widgets/sortable
//= require rails_sortable <- You need this line
$('.sortableTeams').railsSortable();
instead of
$('.sortableTeams').NewSortable();
I closed this issue. Feel free to reopen it if there still be any problems.
In any model when try to sort:
application.js
application_controller.rb
team.rb (model)
schema
1.1.3 works perfect.