Makes labelled_tabular_form_for accept different signatures.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7900 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3adc1c3192
commit
c4540c799f
|
@ -862,10 +862,13 @@ module ApplicationHelper
|
|||
content_tag("label", label_text)
|
||||
end
|
||||
|
||||
def labelled_tabular_form_for(name, object, options, &proc)
|
||||
def labelled_tabular_form_for(*args, &proc)
|
||||
args << {} unless args.last.is_a?(Hash)
|
||||
options = args.last
|
||||
options[:html] ||= {}
|
||||
options[:html][:class] = 'tabular' unless options[:html].has_key?(:class)
|
||||
form_for(name, object, options.merge({ :builder => TabularFormBuilder, :lang => current_language}), &proc)
|
||||
options.merge!({:builder => TabularFormBuilder, :lang => current_language})
|
||||
form_for(*args, &proc)
|
||||
end
|
||||
|
||||
def back_url_hidden_field_tag
|
||||
|
|
Loading…
Reference in New Issue