Sha256: 11458aa71be759a06e4ffa5b3a17536ddeff394709dffedc5773e4ddae07849d
Contents?: true
Size: 500 Bytes
Versions: 9
Compression:
Stored size: 500 Bytes
Contents
# This migration comes from spree (originally 20130417120035) class UpdateAdjustmentStates < ActiveRecord::Migration[4.2] 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
9 entries across 9 versions & 2 rubygems