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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---