gregbell/active_admin — pull request #2679 by shekibobo (2013-11-08 21:06:06+00:00)
Title: Rewrite has_many form structure

Potential solution for #2659.

I'm not sure if the important parts of this PR (cbd141d) are that much different from @igorbernstein's work in #2675, but it does manage to render a valid html structure.

On weird thing is, however, that the hidden `id` field for `has_many` get rendered as siblings to the `fieldset` that contains the other fields related to it, and I have no idea why.

```html

Questions

```

Aside from this anomaly, this seems to work okay, solving both #2655 and #2659, although not exactly to the spec I proposed there. And apparently we can even support nesting `inputs > has_many` without generating invalid html. Again, not really sure why mine works and Igor's doesn't, but hey, there it is.