Submitting wrong ajax form

Hey,

I am having a strange issue in Ruby on Rails, on a page set up like
the following:

[Form to add an item - when added, rails re-renders list below me]

[Item 1 [edit/delete]]

[Item 2 [edit/delete]]

When they click edit, it loads a form for them to edit the item within
the same

. The adding works, and a new item is made in the list
below. Now the problem is that when I click to edit item 1, it will
load the form correctly, and when I submit the button “Update Item”,
it appears to call the add function because it highlights the items
(which the add function does) and rerenders the list, whereas
according to my form_remote_tag, it should just re-render that
specific item
.

I have triple-checked all of my forms, and they are all closed off,
and the edit form definitely calls “edit”, not “create”.

The edit function works if I disable the add item partial on the
page.

Any ideas why the forms would be overlapping?

Thanks,
John