Hi all,
users can be dragged to nodes to move or copy a user from one node to another node. I have a problem with how I send the variables to user move and copy methods in userscontrol.
The drop zone is defined as:
<%=drop_receiving_element "move_drop_zone_"+node.id.to_s,
:update => "users",
:url => move_user_path(:id => node.id),
:method => :put,
:accept => "move_user" %>
The draggable user in a node is defined as:
<span id="move_user_<%=user.id%>_<%= node.id.to_s %>" class="move_user" >
<%=image_tag('move_user.png') %>
</span>
<%= draggable_element "move_user_" + user_node, :revert => true %>
I also added to routes:
map.resources :users, :member => { :move => :put, :copy => :put }
The problem is that I don't know how to pass the user id and from node id. Since it's a put operation I only see the id (which is the target node id) defined in the url of drop_receiving_element.
Thanks, Stijn