I do not like if the value is empty, if the attribute is not sent. This breaks the way Rails expects attribute updates, and can be a problem if you use controller actions for the API as well as for the HTML. My preferred way to handle this is to add a hidden input field before multiselects.
<input type="hidden" value="" name="parent_model[my_attribute_ids][]">
If you use jQuery, you can automate the addition of these hidden input fields:
$('select[multiple="multiple"]').each(function(i){ $(this).before('<input type="hidden" name="'+this.name+'" value="" />') });
I understand that this answer is not very timely, but I hope this helps someone with a similar question.
source share