I have a form where I can edit details about a person. This includes
adding addresses which can be used to contact the person. A person can
have any number of addresses.
On the edit person screen I have a list of the addresses which are a
associated with that person. Clicking on ‘Add address’ causes a new form
to appear (uses link_to_remote) this form is completed and the results
are written to the database, the list of addresses on the page is
updated by re-rendering the partial.
The problem that I am having is that I’m using the :update to add the
new address to the list of addresses but I also need to remove the form
which appeared and replace it once again with the 'Add address" link.
How can I do this? Can I update 2 divs?