Class: Dorsale::BillingMachine::SmallData::FilterStrategyByCustomer

Inherits:
SmallData::FilterStrategy show all
Defined in:
app/models/dorsale/billing_machine/small_data/filter_strategy_by_customer.rb

Instance Method Summary collapse

Instance Method Details

#apply(query, value) ⇒ Object



5
6
7
8
# File 'app/models/dorsale/billing_machine/small_data/filter_strategy_by_customer.rb', line 5

def apply(query, value)
  type, id = value.split("-")
  query.where(customer_type: type, customer_id: id)
end