diff options
author | Ben Pickles <spideryoung@gmail.com> | 2012-03-01 19:07:28 +0000 |
---|---|---|
committer | Ben Pickles <spideryoung@gmail.com> | 2012-03-01 19:51:56 +0000 |
commit | 81d3493c172dc717a86e81a855f4983a3774b846 (patch) | |
tree | 7f2e3e12f6ef5284ae40350330ab237ac9719e21 /actionpack/lib | |
parent | 447d87c206ff70046b15be99e73ec79690687bb9 (diff) | |
download | rails-81d3493c172dc717a86e81a855f4983a3774b846.tar.gz rails-81d3493c172dc717a86e81a855f4983a3774b846.tar.bz2 rails-81d3493c172dc717a86e81a855f4983a3774b846.zip |
Allow fieldsets to be created without a block.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_tag_helper.rb | 3 |
1 files changed, 1 insertions, 2 deletions
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 %> # # => <fieldset class="format"><p><input id="name" name="name" type="text" /></p></fieldset> 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("</fieldset>") end |