Sha256: 669b0ab6331e502dff3bd344936aaf45524901c20611ddc26fdc9855eda52865
Contents?: true
Size: 409 Bytes
Versions: 15
Compression:
Stored size: 409 Bytes
Contents
# frozen_string_literal: true module SolidusBactracs module Shipment class BetweenQuery 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 end end end
Version data entries
15 entries across 15 versions & 1 rubygems