Sortable Element with Partials?


Hi Everyone,

I originally had my sortable element list working properly like so:

    <% @items.each do |item| %>
  • <%= image_tag "dragme.gif" %> <%= item.value %> <%= link_to("Delete", :action => "destroy", :id => %>
  • <%= sortable_element(‘sortable_list’, :update => “list-info”, :url =>
    {:action => :update_positions}) %>
    <% end %>

However, now that I have added AJAX CRUD controls, I can’t seem to get
the sortable elements to work! I am using a partial within my

    I suspect that this may be part of the problem…
      <%= render(:partial => 'item', :collection => @items) %>
    <%= sortable_element('sortable_list', :update => "list-info", :url => {:action => :update_positions}) %>

    I think it may not be getting the proper items or IDs to set them to
    “sortable elements”. Does anybody have any ideas?

    Thanks in advance. By the way, I am very new to rails, please let me
    know if you need anything else to help solve the problem.


bump. Anyone?