Sha256: 16ac16e337c2e17b019bbdbbbdfc1511edc8fc99c4e3ff2c5c116c5d053223a1

Contents?: true

Size: 263 Bytes

Versions: 11

Compression:

Stored size: 263 Bytes

Contents

class Dorsale::BillingMachine::SmallData::FilterStrategyByState < ::Dorsale::SmallData::FilterStrategy
  def apply(query, value)
    if value.to_s.match(/not_(.+)/)
      query.where("state != ?", $~[1])
    else
      query.where(state: value)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
dorsale-3.4.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.3.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.2.0 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.1.7 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.1.6 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.1.5 app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.1.4 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.1.3 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.1.2 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.1.1 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.1.0 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb