Sha256: 735f508ced143148a3c1b82cbe99be68830992b3c0fa0214087182e361efb846
Contents?: true
Size: 510 Bytes
Versions: 9
Compression:
Stored size: 510 Bytes
Contents
# This migration comes from spree (originally 20141101231208) class FixAdjustmentOrderPresence < ActiveRecord::Migration def change say 'Fixing adjustments without direct order reference' Spree::Adjustment.where(order: nil).find_each do |adjustment| adjustable = adjustment.adjustable if adjustable.is_a? Spree::Order adjustment.update_attributes!(order_id: adjustable.id) else adjustment.update_attributes!(adjustable: adjustable.order) end end end end
Version data entries
9 entries across 9 versions & 5 rubygems