Trying to get a form for adding, editing and removing embedded documents working as described in this question: Rails + MongoMapper + EmbeddedDocument form help.
I've got it mostly to work, however, when editing a document, if all embedded documents are removed by clicking the remove link the params object that is passed to the controller does not include the array field at all, so update_attributes
ignores it thinking that it hasn't been changed, so doesn't actually remove the embedded documents at all.
Has anyone else encountered this? And other than a hacky way of dealing with it on a case by case basis, is there a nice, neat solution?