I have an application that has a list of patient names and then a grid representing appointment slots (time).
Each patient has a unique ID and draggable_element tag:
<%= draggable_element "#{rx_ready_patient.id}", :revert => true %>
Then every "slot" in my grid is a droppable element:
<%= drop_receiving_element "slot_#{slot.id}", :hoverclass => "hover", :url => { :action => "add_appointment" } %>
Now so far it all works okay - excepting I don't get a critical piece of information -- what is the DOM ID of the drop element. When I drag and drop I get this in the console:
Processing CalendarController#add_appointment (for 127.0.0.1 at 2008-05-27 16:46:46) [POST] Session ID: b958c16b06868fdaa74450b07b0dc339 Parameters: {"authenticity_token"=>"13ecc13e1b8114add81d985eb2327ea83a61d2fa", "action"=>"add_appointment", "id"=>"378", "controller"=>"calendar"}
The ID is that of the patient I dropped on the slotbox -- but which slot box?! Anyone know how I would pass both the slotbox ID along with the patient ID? I need both to successfully create an appointment.