Skip to content

Commit

Permalink
Let capture handle the yielding.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Apr 12, 2010
1 parent 3fc609e commit 3eda7cf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions actionpack/lib/action_view/helpers/form_helper.rb
Expand Up @@ -527,10 +527,7 @@ def fields_for(record_or_name_or_array, *args, &block)
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
Expand Down

0 comments on commit 3eda7cf

Please sign in to comment.