Sha256: 20a7fde1ceabdec6d2fc6f00109c43b233244050064b2553db73c5fa87c987f8
Contents?: true
Size: 410 Bytes
Versions: 8
Compression:
Stored size: 410 Bytes
Contents
# frozen_string_literal: true module SolidusBacktracs 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
8 entries across 8 versions & 2 rubygems