3
4
5
6
7
8
9
|
# File 'app/models/ba_spree/adjustment_decorator.rb', line 3
def self.prepended(base)
base.scope :payment_method, -> { where(source_type: 'Spree::PaymentMethod') }
base.scope :non_payment_method, -> { where.not(source_type: 'Spree::PaymentMethod') }
base.scope :non_shipping, -> { where.not(adjustable_type: 'Spree::Shipment') }
base.scope :promotion, -> { where(source_type: 'Spree::PromotionAction') }
base.scope :non_promotion, -> { where.not(source_type: 'Spree::PromotionAction') }
end
|