1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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 end
builder = options[:builder] || ActionView::Base.default_form_builder builder = options[:builder] || ActionView::Base.default_form_builder
capture(builder.new(object_name, object, self, options, block), &block)
capture do
yield builder.new(object_name, object, self, options, block)
end
end end
# Returns a label tag tailored for labelling an input field for a specified attribute (identified by +method+) on an object # Returns a label tag tailored for labelling an input field for a specified attribute (identified by +method+) on an object