Sha256: 5b64ea596cf149a7f8f68aff0d2e13d2bb85cd50e21669c22e1bdd7915d7a7d9

Contents?: true

Size: 347 Bytes

Versions: 12

Compression:

Stored size: 347 Bytes

Contents

class Agilibox::SmallData::FilterStrategyByKeyValues < ::Agilibox::SmallData::FilterStrategyByKeyValue
  def apply(query, value)
    value = value.split if value.is_a?(String)
    value = value.select(&:present?)
    column = column_for(query)

    if value.any?
      query.where("#{column} IN (?)", value)
    else
      query
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
agilibox-2.0.0 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
agilibox-1.11.0 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
agilibox-1.10.5 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
agilibox-1.10.2 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
agilibox-1.10.1 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
agilibox-1.10.0 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
agilibox-1.9.20 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
agilibox-1.9.19 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
agilibox-1.9.18 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
agilibox-1.9.17 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
agilibox-1.9.16 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb
agilibox-1.9.15 app/filters/agilibox/small_data/filter_strategy_by_key_values.rb