##// END OF EJS Templates
Makes labelled_tabular_form_for accept different signatures....
Jean-Philippe Lang -
r7780:c4540c799ffe
parent child
Show More
@@ -862,10 +862,13 module ApplicationHelper
862 content_tag("label", label_text)
862 content_tag("label", label_text)
863 end
863 end
864
864
865 def labelled_tabular_form_for(name, object, options, &proc)
865 def labelled_tabular_form_for(*args, &proc)
866 args << {} unless args.last.is_a?(Hash)
867 options = args.last
866 options[:html] ||= {}
868 options[:html] ||= {}
867 options[:html][:class] = 'tabular' unless options[:html].has_key?(:class)
869 options[:html][:class] = 'tabular' unless options[:html].has_key?(:class)
868 form_for(name, object, options.merge({ :builder => TabularFormBuilder, :lang => current_language}), &proc)
870 options.merge!({:builder => TabularFormBuilder, :lang => current_language})
871 form_for(*args, &proc)
869 end
872 end
870
873
871 def back_url_hidden_field_tag
874 def back_url_hidden_field_tag
General Comments 0
You need to be logged in to leave comments. Login now