%table.admin_table.big_menus
  %tr
    -@big_menus.each do |big_menu|
      %th#big_menu_name{:id => big_menu.id}
        =render big_menu
        
  %tr
    -@big_menus.each do |big_menu|
      %td
        =link_to "ajouter un élément", new_admin_big_menu_item_path(:big_menu_id => big_menu.id), :remote => true,  :class => "button"
        .big_menu_items#big_menu_items{:id => big_menu.id, :"data-id" => big_menu.id }
          
          =render big_menu.big_menu_items.order(:position)



:javascript
  $('.big_menu_items').sortable({
    connectWith: ".big_menu_items",
    opacity:0.5,
    update : function () { 
          var order = $(this).sortable('serialize'); 
          
      $.ajax({type : "POST", url : "/admin/big_menus/"+$(this).data("id")+"/reorder.js", data : order});
        }
  
  });