diff --git a/lib/spree/core/calculated_adjustments_decorator.rb b/lib/spree/core/calculated_adjustments_decorator.rb index 6b12b4a64d..592bf59854 100644 --- a/lib/spree/core/calculated_adjustments_decorator.rb +++ b/lib/spree/core/calculated_adjustments_decorator.rb @@ -1,16 +1,16 @@ -# Maybe we don't need this any more? Commenting out during upgrade process +module Spree + module Core + module CalculatedAdjustments + class << self + def included_with_explicit_class_name(klass) + included_without_explicit_class_name(klass) -# module Spree -# module Core -# module CalculatedAdjustments -# module ClassMethods -# def calculated_adjustments_with_explicit_class_name -# calculated_adjustments_without_explicit_class_name -# # Class name is mis-inferred outside of Spree namespace -# has_one :calculator, as: :calculable, dependent: :destroy, class_name: 'Spree::Calculator' -# end -# alias_method_chain :calculated_adjustments, :explicit_class_name -# end -# end -# end -# end + klass.class_eval do + has_one :calculator, as: :calculable, dependent: :destroy, class_name: 'Spree::Calculator' + end + end + alias_method_chain :included, :explicit_class_name + end + end + end +end