diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2012-03-02 02:30:47 -0800 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2012-03-02 02:30:47 -0800 |
commit | 9078dba7de7e703f1558b03502791b16225d18eb (patch) | |
tree | 0f5e2ccfd12425671ea56259548b51d3af2f4ad8 /actionpack/lib | |
parent | fcef72890b7f8b974ee490268a48e147bd621253 (diff) | |
parent | 81d3493c172dc717a86e81a855f4983a3774b846 (diff) | |
download | rails-9078dba7de7e703f1558b03502791b16225d18eb.tar.gz rails-9078dba7de7e703f1558b03502791b16225d18eb.tar.bz2 rails-9078dba7de7e703f1558b03502791b16225d18eb.zip |
Merge pull request #5234 from benpickles/allow-empty-fieldsets
Allow empty 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 |