Skip to content

Commit

Permalink
Specify class name for calculator association in calculated_adjustment
Browse files Browse the repository at this point in the history
Otherwise, top-level classes that include this module will have an association that looks for ::Calculator, rather than Spree::Calculator
  • Loading branch information
radar committed Jun 6, 2013
1 parent 236153d commit 40416bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/spree/core/calculated_adjustments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Core
module CalculatedAdjustments
def self.included(klass)
klass.class_eval do
has_one :calculator, :as => :calculable, :dependent => :destroy
has_one :calculator, :class_name => "Spree::Calculator", :as => :calculable, :dependent => :destroy
accepts_nested_attributes_for :calculator
attr_accessible :calculator_type, :calculator_attributes
validates :calculator, :presence => true
Expand Down

0 comments on commit 40416bc

Please sign in to comment.