From 934706a8da461a73fe429b3fcaa0e2ab055a9195 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Tue, 8 Jan 2008 21:16:22 +0000 Subject: Replace labelled_form_for example with one that will actually work. References #10738 [justinfrench, Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/form_helper.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 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 2bfb896633..f67a040149 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -155,8 +155,9 @@ module ActionView # # In many cases you will want to wrap the above in another helper, so you could do something like the following: # - # def labelled_form_for(name, object, options, &proc) - # form_for(name, object, options.merge(:builder => LabellingFormBuiler), &proc) + # def labelled_form_for(record_or_name_or_array, *args, &proc) + # options = args.extract_options! + # form_for(record_or_name_or_array, *(args << options.merge(:builder => LabellingFormBuiler)), &proc) # end # # If you don't need to attach a form to a model instance, then check out FormTagHelper#form_tag. -- cgit v1.2.3