Class: Workarea::Search::RangeFilter

Inherits:
Filter
  • Object
show all
Defined in:
app/queries/workarea/search/range_filter.rb

Instance Attribute Summary

Attributes inherited from Filter

#name, #options, #search

Instance Method Summary collapse

Methods inherited from Filter

#current_value, #display_name, #initialize, #params_for, #selected?, #useless?, #valid_params

Constructor Details

This class inherits a constructor from Workarea::Search::Filter

Instance Method Details

#query_clauseObject



5
6
7
8
# File 'app/queries/workarea/search/range_filter.rb', line 5

def query_clause
  return {} unless current_value.present?
  { range: { name => { options => current_value } } }
end

#system_nameObject



10
11
12
# File 'app/queries/workarea/search/range_filter.rb', line 10

def system_name
  @system_name ||= name + suffix
end