Sha256: f253dada9d9f1627869b0f4ff9bc4240b30e1ff8fff68eaef3225a33c5fd29d4

Contents?: true

Size: 334 Bytes

Versions: 55

Compression:

Stored size: 334 Bytes

Contents

class RemoveShippedState < ActiveRecord::Migration
  def self.up
    Order.where(:state => 'shipped').each do |order|
      order.update_attribute_without_callbacks("state", "complete")
      order.shipments.each do |shipment|
        shipment.state = 'shipped'
        shipment.save
      end
    end
  end

  def self.down
  end
end

Version data entries

55 entries across 43 versions & 9 rubygems

Version Path
spree_core-0.70.7 db/migrate/20101026184855_remove_shipped_state.rb
spree_core-0.70.6 db/migrate/20101026184855_remove_shipped_state.rb
apispree_core-0.0.0 db/migrate/20101026184855_remove_shipped_state.rb
My-Commerce_core-1.1.0 db/migrate/20101026184855_remove_shipped_state.rb
My-Commerce_core-1.0.0 db/migrate/20101026184855_remove_shipped_state.rb
MyCommerceapi-1.0.0 api/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerceapi-1.0.0 dash/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerceapi-1.0.0 promo/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerceapi-1.0.0 core/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerceapi-1.0.0 auth/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerceapi-1.0.0 core/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerceapi-1.0.0 sandbox/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerce-0.0.3 promo/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerce-0.0.3 core/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerce-0.0.3 auth/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerce-0.0.3 dash/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerce-0.0.3 core/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerce-0.0.3 api/spec/test_app/db/migrate/20101026184855_remove_shipped_state.rb
MyCommerce-0.0.3 sandbox/db/migrate/20101026184855_remove_shipped_state.rb
rfcommerce_sandbox-0.0.3 db/migrate/20101026184855_remove_shipped_state.rb