Sha256: 960d170a92eb0457f462a4bdc7bd8177572723e863939ff1593570d389b695ff

Contents?: true

Size: 357 Bytes

Versions: 15

Compression:

Stored size: 357 Bytes

Contents

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
dorsale-2.3.5 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.3.4 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.3.3 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.3.2 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.3.1 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.3.0 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.2.16 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.2.15 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.2.14 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.2.13 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.2.12 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.2.11 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.2.10 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.2.9 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
dorsale-2.2.8 app/models/dorsale/billing_machine/small_data/filter_strategy_by_state.rb