Skip to content


Subversion checkout URL

You can clone with
Download ZIP


`f.inputs` only generates a legend for the first fieldset. #480

pivotal-casebook opened this Issue · 8 comments

3 participants


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:


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.



Awesome! Thanks.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.