Open Mingus85 opened 8 years ago
@Mingus85 Can you please share your code?. especially, the create
action of the controller. It is just to know what you are exactly trying to do.
And the last part is because , Using the nested form, we add fields dynamically, so for the first time when form is rendered, we donot initialize any objects of the child class. The FormBuilder object is yielded when usingform_for
or fields_for
. and When these values are submitted to server, we initialize objects so next time when it is re-render it is displayed with its object ids.
I'm using
simple_nested_form_for
to build a form with nested fields. When I press submit, I get the correct params hash, and validation seems to work. When after some validations do not pass I re-render the form via thecreate
action, however, the nested fields are displayed incorrectly. The same nested fields are shown multiple times.Also, in my
simple_fields_for
theFormBuilder
index
is shown as a semi random number such as1454793731550
, whereas after re-rendering it is displayed in normal increments0-n
.