Given a @post with two comments, when we do the following:
= semantic_form_for @post do |f|
= f.inputs :content, :name => '%i', :for => :comments
we see a fieldset for each comment, but only the first fieldset has a legend. We expected each fieldset to have a legend.
Demo app with failing test case: https://github.com/pivotal-casebook/formtastic-legend-testcase
Having trouble setting up the right spec for this. I can't get it to render more than one nested object (eg comment) in my specs. Can you confirm that your test case actually renders all comments (but only one with a legend)?
I'm not sure what you mean. Running rake should yield a failing spec.
I hit the "Comment and Close" button by accident instead of "Comment". Would you reopen this for me? Thanks.
I'm trying to set-up a failing spec in Formtastic, not your code base.
(Replying from my own account:)
Ah, got it. Yes, it's rendering multiple comments. Is your spec missing accepts_nested_attributes, maybe?
Ok, am able to reproduce a failing spec, not sure WTF I was doing before. Thanks, looking into it now.
Wow, that was a hard one to track down. The :name option was being deleted in the first iteration over the collection, easily fixed with a .dup in 44a9cc3. Will push a beta gem soon, bundle from that specific hash with the :git and :ref options if you're in a hurry.
dup the html_options before deleting stuff from it, resolves GH-480