app/views/snaptable/sort.js.erb in snaptable-1.1.3 vs app/views/snaptable/sort.js.erb in snaptable-1.2.0
- old
+ new
@@ -1,3 +1,4 @@
-var snaptable = $("#snaptable");
-snaptable.replaceWith('<%= j @table.present(buttons: params[:partial]) %>');
-snapifyTable();
\ No newline at end of file
+var tableName = "<%= params[:table] %>";
+var snaptable = $(".snaptable." + tableName);
+snaptable.replaceWith('<%= j content %>');
+snapifyTable($(".snaptable." + tableName));