Sha256: 9c9ca3431069d3dd1da4d1f60afe986e0118cf437c7f8d206d0615e887840d6b

Contents?: true

Size: 301 Bytes

Versions: 9

Compression:

Stored size: 301 Bytes

Contents

class BMC::Filter::ByKeyValues < BMC::Filter::ByKeyValue
  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

9 entries across 9 versions & 1 rubygems

Version Path
bmc-1.3.3 app/filters/bmc/filter/by_key_values.rb
bmc-1.3.2 app/filters/bmc/filter/by_key_values.rb
bmc-1.3.1 app/filters/bmc/filter/by_key_values.rb
bmc-1.3.0 app/filters/bmc/filter/by_key_values.rb
bmc-1.2.1 app/filters/bmc/filter/by_key_values.rb
bmc-1.2.0 app/filters/bmc/filter/by_key_values.rb
bmc-1.1.0 app/filters/bmc/filter/by_key_values.rb
bmc-1.0.1 app/filters/bmc/filter/by_key_values.rb
bmc-1.0.0 app/filters/bmc/filter/by_key_values.rb