Sha256: 04e83a30727ee3608aceba44824ca8042e00db8459c0d2e54443d45051c741fe

Contents?: true

Size: 359 Bytes

Versions: 22

Compression:

Stored size: 359 Bytes

Contents

module Dorsale
  module BillingMachine
    module SmallData
      class 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
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
dorsale-3.0.3 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.0.2 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.0.1 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-3.0.0 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.7.3 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.7.2 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.7.1 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.7.0 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.6.8 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.6.7 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.6.6 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.6.5 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.6.4 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.6.3 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.6.2 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.6.1 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.6.0 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.5.0 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.4.3 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.4.2 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb