Sha256: 2c4299740a5f5d17963ae6bb7f3a5939860ddfcbcce4b9901f8cf6f27d891fa9

Contents?: true

Size: 266 Bytes

Versions: 36

Compression:

Stored size: 266 Bytes

Contents

class Dorsale::BillingMachine::SmallData::FilterStrategyByState < ::Agilibox::SmallData::FilterStrategy
  def apply(query, value)
    if (m = value.to_s.match(/not_(.+)/))
      query.where.not(state: m[1])
    else
      query.where(state: value)
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
dorsale-3.13.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.12.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.11.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.10.3 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.10.2 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.10.1 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.10.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.9.8 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.9.7 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.9.6 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.9.5 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.9.4 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.9.3 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.9.2 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.9.1 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.9.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb