Hello,
I am attempting to create an admin tool so that admins can drag and drop "users" to add them to a "group". Once I have dropped the users into the group element, I want to update my group_users table which is HABTM.
So far, I have properly created a draggable element for each user:
<%= draggable_element "#{user.id}", :revert => true %>
I am also using the drop_receiving_element for each group (properly accessed "add" when item is dropped) <%= drop_receiving_element "group#{group.id}", :url => { :action => "add"}, :accept => "users", :loading => "Element.show('indicator')", :complete => "Element.hide('indicator')" %>
What I need to also pass is the group.id so that I can update the group_users table upon drop. In all the documentation I've read about scriptaculous drag-and-drop & drag-and-drop sortable-lists, nothing is explained about the options you can pass to the drop_receiving_element tag.
Has anyone implemented this with dynamic lists?
Thanks! -Dina