From 3ff3ff4f54beb5bd73e34ce3b8ae27e4271f1f9d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 16 May 2016 07:28:12 +0000 Subject: [PATCH] Code cleanup. git-svn-id: http://svn.redmine.org/redmine/trunk@15418 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/query.rb b/app/models/query.rb index cc84b01ed..bb1807f6e 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -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) -- 2.39.5