vanilla-nested
vanilla-nested copied to clipboard
Support 3 level nesting
This PR adds support for creating a form with 3 levels: the parent form, dynamic children, and dynamic grandchildren.
This requires a new convention to work properly since it's simple to detect when we nave this extra nesting to do it automatically.
- If more than one nesting is used, the new
idx_placeholder
option must be defined by the user of the gem and each level must have a different value - The wrapper ids for a nested element must include the parent's id and
idx_placeholder
value
The test app includes an example of these conventions:
https://github.com/arielj/vanilla-nested/blob/support-3-level-nesting/test/VanillaNestedTestRails7/app/views/users/_form.html.erb#L5
https://github.com/arielj/vanilla-nested/blob/support-3-level-nesting/test/VanillaNestedTestRails7/app/views/users/_pet_fields.html.erb#L12-L17