diff options
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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. |