]> source.dussan.org Git - redmine.git/commitdiff
Code cleanup.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 16 May 2016 07:28:12 +0000 (07:28 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 16 May 2016 07:28:12 +0000 (07:28 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@15418 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/query.rb

index cc84b01ed32229cb5ad22717be24bcfb2cbf42fe..bb1807f6eae0ef0d8e17b9cee599c7a0a1559ab7 100644 (file)
@@ -422,7 +422,7 @@ class Query < ActiveRecord::Base
 
   def label_for(field)
     label = available_filters[field][:name] if available_filters.has_key?(field)
-    label ||= l("field_#{field.to_s.gsub(/_id$/, '')}", :default => field)
+    label ||= queried_class.human_attribute_name(field, :default => field)
   end
 
   def self.add_available_column(column)