From 81d3493c172dc717a86e81a855f4983a3774b846 Mon Sep 17 00:00:00 2001 From: Ben Pickles Date: Thu, 1 Mar 2012 19:07:28 +0000 Subject: Allow fieldsets to be created without a block. --- actionpack/lib/action_view/helpers/form_tag_helper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'actionpack/lib/action_view/helpers/form_tag_helper.rb') diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index 2cf1c9055c..9fad30a48f 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -525,10 +525,9 @@ module ActionView # <% end %> # # =>

def field_set_tag(legend = nil, options = nil, &block) - content = capture(&block) output = tag(:fieldset, options, true) output.safe_concat(content_tag(:legend, legend)) unless legend.blank? - output.concat(content) + output.concat(capture(&block)) if block_given? output.safe_concat("") end -- cgit v1.2.3