Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8600

Show
Ignore:
Timestamp:
01/08/08 21:20:41 (8 months ago)
Author:
nzkoz
Message:

Merge labelled_form_for example. Closes #10738 [justinfrench, Koz]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2-0-stable/actionpack/lib/action_view/helpers/form_helper.rb

    r8253 r8600  
    156156      # In many cases you will want to wrap the above in another helper, so you could do something like the following: 
    157157      # 
    158       #   def labelled_form_for(name, object, options, &proc) 
    159       #     form_for(name, object, options.merge(:builder => LabellingFormBuiler), &proc) 
     158      #   def labelled_form_for(record_or_name_or_array, *args, &proc) 
     159      #     options = args.extract_options! 
     160      #     form_for(record_or_name_or_array, *(args << options.merge(:builder => LabellingFormBuiler)), &proc) 
    160161      #   end 
    161162      #