I wonder if there is a method that returns all child objects of an object, or create a new child object if none of them exists.
Such a method is convenient for creating nested form, where it often the case that because a child object has not been initialized that the nested form does not show up.
Thank you.
I do this in nested forms:
or wrap it as a model method:
then use it in form