Drag and drop between lists question

Hi -

I was wondering if anyone has an example of dragging and dropping
between sortable_elements. Basically, I want to have two lists, and to
be able to drag from the first list to the second while also allowing
the ability to sort the second list. Each time an item is dragged to the
second list, I need an action that both adds the item to the list and
reorders the existing items. I can set up the view, I’m just not sure
what the controller code would look like. I’ve seen examples for sorting
lists, but not something like this where the action needs to add or
remove from the list before sorting. I suppose I could just blow away
the list in the database each time and then recreate it with the
serialized list, but that seems inefficient. Any ideas?

Thanks,

-J.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs