Sha256: b7881bf13de7d0086c27df0418f93063aca0ee30b59784773ddda4e798369d14
Contents?: true
Size: 421 Bytes
Versions: 14
Compression:
Stored size: 421 Bytes
Contents
# This migration comes from spree (originally 20130806145853) class SetDefaultStockLocationOnShipments < ActiveRecord::Migration def change if Spree::Shipment.where('stock_location_id IS NULL').count > 0 location = Spree::StockLocation.find_by(name: 'default') || Spree::StockLocation.first Spree::Shipment.where('stock_location_id IS NULL').update_all(stock_location_id: location.id) end end end
Version data entries
14 entries across 14 versions & 7 rubygems