Class: SolidusBacktracs::Shipment::BetweenQuery
- Inherits:
-
Object
- Object
- SolidusBacktracs::Shipment::BetweenQuery
- Defined in:
- app/queries/solidus_backtracs/shipment/between_query.rb
Class Method Summary collapse
Class Method Details
.apply(scope, from:, to:) ⇒ Object
6 7 8 9 10 11 |
# File 'app/queries/solidus_backtracs/shipment/between_query.rb', line 6 def self.apply(scope, from:, to:) scope.joins(:order).where(<<~SQL.squish, from: from, to: to) (spree_shipments.updated_at > :from AND spree_shipments.updated_at < :to) OR (spree_orders.updated_at > :from AND spree_orders.updated_at < :to) SQL end |