Sha256: 1f7e406e2a368df946d7d733a3bfb68801e8266061ca70a0ee0250b6e2ab6923
Contents?: true
Size: 504 Bytes
Versions: 14
Compression:
Stored size: 504 Bytes
Contents
# This migration comes from spree (originally 20130417120035) class UpdateAdjustmentStates < ActiveRecord::Migration def up Spree::Order.complete.find_each do |order| order.adjustments.update_all(:state => 'closed') end Spree::Shipment.shipped.includes(:adjustment).find_each do |shipment| shipment.adjustment.update_column(:state, 'finalized') if shipment.adjustment end Spree::Adjustment.where(:state => nil).update_all(:state => 'open') end def down end end
Version data entries
14 entries across 14 versions & 7 rubygems