Project

General

Profile

Actions

Patch #29710

closed

Remove unused variable 'filter_options' from Query#add_filter

Added by Yuichi HARADA about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The variable was changed in r86 along with the instance method Query#add_filter.
However, filter_options is unused.
(In r86, most of the filter_options's processing was comment out.)

I would like to change it as follows.

diff --git a/app/models/query.rb b/app/models/query.rb
index fa5c926ba..2c0f90161 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -613,7 +613,6 @@ class Query < ActiveRecord::Base
     return unless values.nil? || values.is_a?(Array)
     # check if field is defined as an available filter
     if available_filters.has_key? field
-      filter_options = available_filters[field]
       filters[field] = {:operator => operator, :values => (values || [''])}
     end
   end


Files

Actions

Also available in: Atom PDF