>From looking at the code for update_record_from_params it does not handle 
>deleting the last record in a subform.  I currently have empty records 
>disabled which means that the association is not present in params and as a 
>result is not being emptied.  The reason I have blank records disabled is that 
>it causes other problems when the user modifies that blank record to an 
>invalid state there is no way to clean up.

I see the comment that states that because of subforms associations are only 
cleared out when displayed with a form UI.  This strikes me as a hack, and the 
comments seem to support this (implying it only works better not in all cases). 
 The method could know whether it was processing a top level record or a 
subform.  It would require the recursive use of the method to pass a parameter 
indicating it as processing a subform.

Has anyone else encountered this?  Does anyone else disable the blank record 
and then try to remove all records in the association?

Michael

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to