aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_helper.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-04-12 10:55:43 +0200
committerJosé Valim <jose.valim@gmail.com>2010-04-12 10:55:43 +0200
commit3eda7cf09073ca73f8f45ca1cdd08938cd20d64f (patch)
tree387f55c6accd1154142087bd049567bb6e712516 /actionpack/lib/action_view/helpers/form_helper.rb
parent3fc609ee4122560357274f70f016e41e1a059968 (diff)
downloadrails-3eda7cf09073ca73f8f45ca1cdd08938cd20d64f.tar.gz
rails-3eda7cf09073ca73f8f45ca1cdd08938cd20d64f.tar.bz2
rails-3eda7cf09073ca73f8f45ca1cdd08938cd20d64f.zip
Let capture handle the yielding.
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 46b2902fb1..d3604925e8 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -527,10 +527,7 @@ module ActionView
end
builder = options[:builder] || ActionView::Base.default_form_builder
-
- capture do
- yield builder.new(object_name, object, self, options, block)
- end
+ capture(builder.new(object_name, object, self, options, block), &block)
end
# Returns a label tag tailored for labelling an input field for a specified attribute (identified by +method+) on an object