Allow empty fieldsets to be created without a block. #5234

merged 1 commit into from Mar 2, 2012

3 participants


Without this I have to use a superfluous empty block:

<%= field_set_tag 'Legend!' do %>
<% end %>
Ruby on Rails member

Just curious, could you provide any good case when I would want to have an empty fieldset?


In our case we're populating the empty fieldset on the client-side - but it's also about minimising surprises: I was surprised to get a LocalJumpError when I didn't include a block.

Ruby on Rails member

Makes sense, it's always a good practice to check for a block anyway.

@drogus drogus merged commit 9078dba into rails:master Mar 2, 2012

<%= field_set_tag('Legend!'){} %>
looks lighter btw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment