Sha256: c7a6a8d591debd6cf936e233f556d0cf03b4db67122253f2f8c589e6bcb8401b
Contents?: true
Size: 376 Bytes
Versions: 2
Compression:
Stored size: 376 Bytes
Contents
module Symphonia module ModelFilters class StringFilter < Base def apply(scope) super t = scope.arel_table scope.where(t[name].lower.send(operator, Array(value).map(&:downcase))) end def form_field(_c) _c.text_field_tag(form_field_name, @query.active_filters[name], class: 'form-control') end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
symphonia-2.1.8 | lib/symphonia/model_filters/string_filter.rb |
symphonia-2.1.7 | lib/symphonia/model_filters/string_filter.rb |