summaryrefslogtreecommitdiffstats
path: root/app/models/query.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-25 12:50:33 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-25 12:50:33 +0000
commit03f0236a6ee995363c54f958d66a0abbf0d3a827 (patch)
tree0551acd363c0f7eb92c62fb7f142e2e13200ec1b /app/models/query.rb
parent02757f5892af308c0cdf905e3d504a5ce3ad84de (diff)
downloadredmine-03f0236a6ee995363c54f958d66a0abbf0d3a827.tar.gz
redmine-03f0236a6ee995363c54f958d66a0abbf0d3a827.zip
Prevents NoMethodError on @available_filters.has_key? in query.rb (#1178).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1454 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r--app/models/query.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/query.rb b/app/models/query.rb
index f25b5c401..c19bb8d7e 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -227,7 +227,7 @@ class Query < ActiveRecord::Base
end
def label_for(field)
- label = @available_filters[field][:name] if @available_filters.has_key?(field)
+ label = available_filters[field][:name] if available_filters.has_key?(field)
label ||= field.gsub(/\_id$/, "")
end