Let capture handle the yielding.

This commit is contained in:
José Valim
2010-04-12 10:55:43 +02:00
parent 3fc609ee41
commit 3eda7cf090

View File

@@ -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