Skip to content
Browse files

Let capture handle the yielding.

  • Loading branch information...
1 parent 3fc609e commit 3eda7cf09073ca73f8f45ca1cdd08938cd20d64f @josevalim josevalim committed Apr 12, 2010
Showing with 1 addition and 4 deletions.
  1. +1 −4 actionpack/lib/action_view/helpers/form_helper.rb
View
5 actionpack/lib/action_view/helpers/form_helper.rb
@@ -527,10 +527,7 @@ def fields_for(record_or_name_or_array, *args, &block)
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

0 comments on commit 3eda7cf

Please sign in to comment.
Something went wrong with that request. Please try again.