Sha256: bef06f7fcc27c0295fb3160cdc4e04fc385aca91c810b2995daeccae21f888a6
Contents?: true
Size: 592 Bytes
Versions: 4
Compression:
Stored size: 592 Bytes
Contents
# This migration comes from spree_auth (originally 20101219201531) class TokensForLegacyOrders < ActiveRecord::Migration def up Spree::TokenizedPermission.table_name = 'tokenized_permissions' # add token permissions for legacy orders (stop relying on user persistence token) Spree::Order.all.each do |order| next unless order.user permission = order.build_tokenized_permission permission.token = order.user.persistence_token permission.save! end Spree::TokenizedPermission.table_name = 'spree_tokenized_permissions' end def down end end
Version data entries
4 entries across 4 versions & 1 rubygems