Sha256: 76d599a2429e06578fb0f99e47557a93c4abb8ac0a8f0e78ddc8961a440c234a

Contents?: true

Size: 348 Bytes

Versions: 1

Compression:

Stored size: 348 Bytes

Contents

# This script migrates the authpwn 0.20 token codes and user IDs to the new
# 0.21 format.
# It should be run in a rails console.

User.all.each do |user|
  user.exuid = nil
  user.set_default_exuid
  user.save!
end

Credential.all.each do |token|
  next unless token.kind_of? Tokens::Base
  token.code = Tokens::Base.random_code
  token.save!
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
authpwn_rails-0.21.0 legacy/migrate_020_to_021.rb