From ed13ee6cbc391c4d5ade48495d32ff4700c4affa Mon Sep 17 00:00:00 2001 From: Cillian O'Ruanaidh Date: Fri, 24 Jun 2022 16:22:20 +0100 Subject: [PATCH] Fix association alignment in OrderCycle --- app/models/order_cycle.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/order_cycle.rb b/app/models/order_cycle.rb index ed72e8912f..0d49dd8d13 100644 --- a/app/models/order_cycle.rb +++ b/app/models/order_cycle.rb @@ -26,8 +26,8 @@ class OrderCycle < ApplicationRecord has_many :schedules, through: :order_cycle_schedules has_many :order_cycle_shipping_methods has_many :selected_shipping_methods, class_name: "Spree::ShippingMethod", - through: :order_cycle_shipping_methods, - source: :shipping_method + through: :order_cycle_shipping_methods, + source: :shipping_method has_paper_trail meta: { custom_data: proc { |order_cycle| order_cycle.schedule_ids.to_s } } attr_accessor :incoming_exchanges, :outgoing_exchanges