Class: MultiSolr::SolrFilterBoolean
- Inherits:
-
SolrFilterSimple
- Object
- SolrFilterSimple
- MultiSolr::SolrFilterBoolean
- Defined in:
- lib/multi_solr/solr_filter_boolean.rb
Overview
Filter for booleans
Instance Attribute Summary
Attributes inherited from SolrFilterSimple
Instance Method Summary collapse
-
#build_solr_query(value) ⇒ Object
Erzeugen des SolR-Query-Strings.
- #render_value(value, options = nil) ⇒ Object
Methods inherited from SolrFilterSimple
#initialize, #label, #sanitize_value
Constructor Details
This class inherits a constructor from MultiSolr::SolrFilterSimple
Instance Method Details
#build_solr_query(value) ⇒ Object
Erzeugen des SolR-Query-Strings
8 9 10 11 |
# File 'lib/multi_solr/solr_filter_boolean.rb', line 8 def build_solr_query value return nil if value.blank? "#{@field_name}:#{to_bool(value)}" end |
#render_value(value, options = nil) ⇒ Object
14 15 16 |
# File 'lib/multi_solr/solr_filter_boolean.rb', line 14 def render_value value, =nil to_bool(value) ? 'yes' : 'no' end |