Sha256: e11037e487cbc31fc4033febd183a7d1527c3ea7eafcf07a8caad260204ca11a
Contents?: true
Size: 450 Bytes
Versions: 21
Compression:
Stored size: 450 Bytes
Contents
class MigrateDeletedStoreCreditsToInvalidated < ActiveRecord::Migration[4.2] def up Spree::StoreCredit.only_deleted.find_each do |store_credit| say "Marking deleted store credit #{store_credit.id} for #{store_credit.user.try(:email)} as invalidated" deleted_at = store_credit.deleted_at store_credit.update_attributes!(deleted_at: nil, invalidated_at: deleted_at) end end def down # intentionally blank end end
Version data entries
21 entries across 21 versions & 1 rubygems