How do you prevent Rails from saving many-to-many updates on a model
I have an edit page for a model object which has a table on it
by a has-many relationship. Each table row consists of a label and a
of checkboxes. I am trying to allow the user to add/remove rows from
table (using AJAX), but then either Cancel or Save the updates along
the rest of the info on the page.
Whenever the AJAX calls update the backing model, the relationships are
saved in the database rather than held in memory. Is there a way to
this, or enable some sort of transaction across http requests, that can
rollback in the case of a cancel?
Or is there a better way to accomplish this?