| Path: | vendor/plugins/pretty_accessible_form/lib/form_builder_helper.rb |
| Last Update: | Wed Feb 06 11:14:39 -0500 2008 |
Create the form_for and remote_form_for methods for a particular form builder. from rubaidh.com‘s tabular form builder
Create the form_for and remote_form_for methods for a particular form builder. from rubaidh.com‘s tabular form builder
# File vendor/plugins/pretty_accessible_form/lib/form_builder_helper.rb, line 4
4: def custom_form_for(builder, fields_pre, fields_post, form_tag, object_name, *args, &proc)
5: raise ArgumentError, "Missing block" unless block_given?
6: options = args.last.is_a?(Hash) ? args.pop : {}
7: concat(form_tag, proc.binding)
8: concat(fields_pre, proc.binding)
9: fields_for(object_name, *(args << options.merge(:builder => builder)), &proc)
10: concat(fields_post, proc.binding)
11: concat("</form>", proc.binding)
12: end