Add Spree::Order#all_adjustments scope, which can be used to get all adjustments on an order, and order's line_items, etc, not just adjustments directly on the order itself.

This commit is contained in:
Matt-Yorkley
2021-01-22 20:39:48 +00:00
parent 4d4c055577
commit 7940a42e8c

View File

@@ -47,6 +47,7 @@ module Spree
dependent: :destroy
has_many :line_item_adjustments, through: :line_items, source: :adjustments
has_many :all_adjustments, class_name: 'Spree::Adjustment', dependent: :destroy
has_many :shipments, dependent: :destroy do
def states