From 3eda7cf09073ca73f8f45ca1cdd08938cd20d64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 12 Apr 2010 10:55:43 +0200 Subject: Let capture handle the yielding. --- actionpack/lib/action_view/helpers/form_helper.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'actionpack/lib/action_view/helpers') 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 -- cgit v1.2.3