summaryrefslogtreecommitdiffstats
path: root/lib/tabular_form_builder.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-02-27 11:32:43 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-02-27 11:32:43 +0000
commit4d892fd6d003ca75d1e5c3009002df7a108f55c1 (patch)
tree6ddcd68c18d68c06cb74672556613403d38561f0 /lib/tabular_form_builder.rb
parent0aebb69c4526e5cb4a692daada352c4cf76a8e5e (diff)
downloadredmine-4d892fd6d003ca75d1e5c3009002df7a108f55c1.tar.gz
redmine-4d892fd6d003ca75d1e5c3009002df7a108f55c1.zip
Fixes #2851.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2531 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tabular_form_builder.rb')
-rw-r--r--lib/tabular_form_builder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tabular_form_builder.rb b/lib/tabular_form_builder.rb
index 2dd2f2903..5bf690bd4 100644
--- a/lib/tabular_form_builder.rb
+++ b/lib/tabular_form_builder.rb
@@ -41,7 +41,7 @@ class TabularFormBuilder < ActionView::Helpers::FormBuilder
# Returns a label tag for the given field
def label_for_field(field, options = {})
return '' if options.delete(:no_label)
- text = l(options[:label]) if options[:label]
+ text = options[:label].is_a?(Symbol) ? l(options[:label]) : options[:label]
text ||= l(("field_" + field.to_s.gsub(/\_id$/, "")).to_sym)
text << @template.content_tag("span", " *", :class => "required") if options.delete(:required)
@template.content_tag("label", text,