Skip to content

Conversation

shekibobo
Copy link
Contributor

Proposed solution for #2659.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.17%) when pulling 1d38199 on shekibobo:fix-has-many-panels into a6f6794 on gregbell:master.

@shekibobo
Copy link
Contributor Author

Ugh, this breaks nested has_many. 🐛

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) when pulling f447974 on shekibobo:fix-has-many-panels into a6f6794 on gregbell:master.

Everything kinda works here, but it's just getting really messy.
Here I try to make use of the `@already_in_an_inputs_block` to render
an `li` instead of a `div` to contain everything. New nested `has_many`
fieldsets should get wrapped in `li`, which they do, but it would be
better if there were a couple levels of `@already_in`. It's 🐢s
all the way down.
Basically all I do here is let form_builder do it's thing with
it's weird invalid html, but account for it in the has_many.js
by counting both children('fieldsets') and all the fieldsets that
would have been originally rendered by the form inside the `li` tag.
@shekibobo
Copy link
Contributor Author

Closing in favor of #2679.

@shekibobo shekibobo closed this Nov 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants