Is it possible to pass a parameter with the method call attached to
the :action of sortable_element? I've put together the code below
which doesn't work but it demonstrates the desired behavior.
# in the view (well, in the helper really but in a method that's
called from the view).
container_ids_containing_items.each do |container_id|
output += sortable_element(
["items_contained_by_container_id_", container_id].join,
:constraint => false,
:handle => "gearItemValueTitle",
:containment => container_ids_containing_items.map { |n|
["items_contained_by_container_id_", n].join},
:scroll => "window",
:url => {:action =>
"update_contained_items_positions(\"#{container_id}\")"})
# in the controller
def update_contained_items_positions(container_id)
# ... - perform save
end