Can someone tell my why my drag and drop doesn't work here?

You need to give the accept attribute as same as the class of the draggable element. Try it, it will work.

This problem is only because of the non matching on the class of draggable element and the accept attribute of the drop_receiving_element,

Give the class attribute to the element as: # _main_col_items.rhtml

<% @issue.articles.each do |article| %> <% if article.column == 'main' %> ###### <% ma_id = "art_#{article.id}" %>    <div class="main_art" id="<%= ma_id %>"><%= article.title %></div>    <%= draggable_element(ma_id, :ghosting=>true, :revert=>true) %> <% end %> <% end %>

replace the above hashed line with and try.. <% ma_id = "art_#{article.id}" , :class => "main_col_item"%>

or place it inside a div, give its class attribute and make the div as draggable.

You might refer development.log. Previously i have faced the same problem where i was able to drag the item but can't drag it. I solved it the way i told u. Might be u r having another issue or i am not getting it correctly.

Thanks Arpit

I think you misunderstood Arpit's suggestion above. It does not matter what type of HTML element you use, what matters is the css class that you use to decorate it. For example, your main_col_items partial renders a set of HTML elements with a 'main_art' css class, so your second drop_receiving_element should have :accept=>'main_art' rather than :accept=>'main_col_item'. The value that you pass is the class of the draggable item, not the name/class of the container from which it is taken.

Also, be aware that the :revert=>true option that you're passing to the draggable_element call is telling the draggable element to snap back into it's original position whenever you drop it, so some of the behavior you're discussing is correct.

As for the actions... is the page being rendered by the IssueController? If not, you need to add the :controller option into the url hash in the drop_receiving_element call. A little named route magic (via RESTful routes) would be better. I suspect that correcting the css class will resolve the issue, though.

HTH, AndyV