Sha256: 27c6ac49bee778b6126c420065e495e6bdebce1ec2bfa39cd42021be42e4ee1c
Contents?: true
Size: 296 Bytes
Versions: 55
Compression:
Stored size: 296 Bytes
Contents
class GenerateAnonymousUsers < ActiveRecord::Migration def self.up User.reset_column_information Order.where(:user_id => nil).each do |order| user = User.anonymous! user.email ||= order.email order.user = user order.save! end end def self.down end end
Version data entries
55 entries across 43 versions & 9 rubygems