Sha256: 618de3b2d0ce01027052a355a4e99e7ca513362684614eed14ab6231b9cc37e8
Contents?: true
Size: 536 Bytes
Versions: 4
Compression:
Stored size: 536 Bytes
Contents
# This migration comes from spree (originally 20101026184959) class GenerateAnonymousUsers < ActiveRecord::Migration def up Spree::User.table_name = 'users' Spree::Order.table_name = 'orders' Spree::User.reset_column_information Spree::Order.where(:user_id => nil).each do |order| user = Spree::User.anonymous! user.email ||= order.email order.user = user order.save! end Spree::User.table_name = 'spree_users' Spree::Order.table_name = 'spree_orders' end def down end end
Version data entries
4 entries across 4 versions & 1 rubygems