Skip to content

Commit

Permalink
Temporarily make originator association available in UpgradeAdjustmen…
Browse files Browse the repository at this point in the history
…t migration
  • Loading branch information
radar committed Oct 8, 2013
1 parent 4aa9182 commit ef97e15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/db/migrate/20130807024301_upgrade_adjustments.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
class UpgradeAdjustments < ActiveRecord::Migration
def up
# Temporarily make originator association available
Spree::Adjustment.class_eval do
belongs_to :originator, polymorphic: true
end
# Shipping adjustments are now tracked as fields on the object
Spree::Adjustment.where(:source_type => "Spree::Shipment").find_each do |adjustment|
# Account for possible invalid data
Expand Down

0 comments on commit ef97e15

Please sign in to comment.