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-4.0.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.20.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.19.1 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.19.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.18.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.17.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.16.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.15.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.11 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.10 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.9 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.8 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.7 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.6 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.5 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.4 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.3 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.2 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.1 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.14.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb