Javascript fails to generate correct html for doubly nested forms#230
Javascript fails to generate correct html for doubly nested forms#230Mysrt wants to merge 1 commit intoryanb:masterfrom
Conversation
|
We can't remove this javascript code because it's here in order to generate correct input names. We even have the test failing with your patch. Could you please push a test application reproducing this issue? Thanks! |
|
I have the same problem and made a test application for it. https://github.com/basvanwesting/nested_form_issues_228.git
|
|
In the test application (branch 'free_format') I found a workaround for the problem:
Apparently the problem resides in the has_one relation. Changing this to has_many solves the issue for me. |
|
I applied patch #125 and this solves the issue in commit 29f5d1 for me. The patch no longer applies directly because of some refactoring in nested_form. I'll make a fork and apply the patch in it's new form. |
|
added pull request: #232 |
If you have a doubly nested creation form, the javascript will incorrectly strip out the name of the second association and replace it with an integer, breaking the form. Also i think this fixes issue #26.