Sha256: b40168a023ae414573e92661783de1c8fcd619bda57c6cff08897ac7c1432adc
Contents?: true
Size: 376 Bytes
Versions: 65
Compression:
Stored size: 376 Bytes
Contents
class PopulateLegacyShipmentState < ActiveRecord::Migration # Hack to allow for legacy migrations class Shipment < ActiveRecord::Base end def self.up Shipment.all.each do |shipment| if shipment.shipped_at shipment.state = "shipped" else shipment.state = "pending" end shipment.save end end def self.down end end
Version data entries
65 entries across 53 versions & 10 rubygems