Ajax not working inside iteration

I'm sorry, but I'm not following this code at the moment. I have a different suggestion for you to try, though. Use a link with method delete and remote true rather than hand-coding the form. The remote helper will construct a form around the link at the moment that you click it, and you'll avoid all of this code. The insta-form will submit to whatever URL you create for the link, and you can add additional parameters to it if necessary without any complexity, simply by putting them in the URL helper like this:

link_to 'Dump', selection_path(tennis_player, foo: bar), remote: true, method: :delete

link_to 'Choose', new_selection_path(tennis_player), remote: true, method: :post

See if that clarifies things for you.

Also, and probably more important than how you code your form, make sure that your selections_controller has something specified in the respond_to block for format.js (this is the format that remote: true triggers), and make sure you have defined a UJS template for each of those methods. Those UJS templates can re-paint the current page, too, so your actions will have immediate effect without any need for additional code or reloading.

create.js.erb and destroy.js.erb would probably work just fine using the same code, as long as both of those methods select all selections:

$('#selections').html('<%=j render @selections %>');

Alternatively, you could probably make an index.js.erb and render action: :index inside the format.js block instead, to reduce copy-pasta.