Sha256: 53ce4ed5e430e51c5ad47fea523387ebb43b6dcb5a7900d881385230e04e3643
Contents?: true
Size: 433 Bytes
Versions: 9
Compression:
Stored size: 433 Bytes
Contents
# Filter for booleans class MultiSolr::SolrFilterBoolean < MultiSolr::SolrFilterSimple # Erzeugen des SolR-Query-Strings def build_solr_query value return nil if value.blank? "#{@field_name}:#{to_bool(value)}" end def render_value value, options=nil to_bool(value) ? 'yes' : 'no' end private def to_bool value value && (value == true || value=='1' || value==1 || value=='true') end end
Version data entries
9 entries across 9 versions & 1 rubygems