From 42a680759766e70cbf8b8acdebcc28481dedebb8 Mon Sep 17 00:00:00 2001 From: Keith Pitt Date: Thu, 7 Apr 2011 12:47:01 +0800 Subject: [PATCH] Allow the name of the custom fields form to be changed --- app/views/admin/custom_fields/_index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/custom_fields/_index.html.haml b/app/views/admin/custom_fields/_index.html.haml index e8b91124..36dbe998 100644 --- a/app/views/admin/custom_fields/_index.html.haml +++ b/app/views/admin/custom_fields/_index.html.haml @@ -3,7 +3,7 @@ - ordered_custom_fields = form.object.send(:"ordered_#{collection_name}") - field_klass = "#{form.object.class.name}#{collection_name.classify}".gsub(/CustomField$/, 'Field').constantize -= form.foldable_inputs :name => :custom_fields, :class => 'editable-list fields' do += form.foldable_inputs :name => defined?(form_name) ? form_name : :custom_fields, :class => 'editable-list fields' do %script{ :type => 'text/x-mustache-template', :name => 'template', :'data-base-input-name' => "#{form.object.class.name.underscore}[#{collection_name}_attributes]" } %li{ :class => "item {{behaviour_flag}} {{new_record_flag}} {{errors_flag}} {{required_flag}}" }