I have a form that, when maximally simplified, looks like this.
ActiveAdmin.register Foo do
form do |f1|
f1.inputs 'DeepFoos' do
f1.has_many :deep_foos do |f2|
f2.input :name
f2.inputs "DeeperFoos for #{f2.object.name}" do
f2.has_many :deeper_foos do |f3|
f3.input :color
end
end
end
end
end
end
When I was using activeadmin 0.6.6
, this rendered fine, with the double-nested resource. After updating to 1.0.0.pre5
, the DeeperFoos
input part of the form disappeared. There's no exception, and it's not in the html source code of the page. It's simply gone.
Weirdly, if I remove the line that says f2.input :name
, the DeeperFoos
input rendered again.
I tried putting a debugger in it, and the debugger is hit, but the gem is so indirect and metaprogrammed that I don't know how I could possibly gain insight from it.
I can't find anything relevant in the activeadmin upgrade docs or the formtastic upgrade docs (which, as a dependency, got upgraded from 2.2.1
to 3.1.5
).
This is probably due to the rewrite to integrate Arbre into forms. You are welcome to open a forms issue but I've given up for now on patching together Arbre, Formtasic and ActionView: as you have discovered it's ugly as they don't always share the same output buffers. ASFAIK relatively few try to use nested has_many. Can you move the input below inputs? Remove the blank line? It may just be a case of fiddling around and taking the best compromise.