Class: Dorsale::BillingMachine::SmallData::FilterStrategyByState
- Inherits:
-
Agilibox::SmallData::FilterStrategy
- Object
- Agilibox::SmallData::FilterStrategy
- Dorsale::BillingMachine::SmallData::FilterStrategyByState
- Defined in:
- app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb
Instance Method Summary collapse
Instance Method Details
#apply(query, value) ⇒ Object
2 3 4 5 6 7 8 |
# File 'app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb', line 2 def apply(query, value) if (m = value.to_s.match(/not_(.+)/)) query.where.not(state: m[1]) else query.where(state: value) end end |