Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bmneely/5639465 to your computer and use it in GitHub Desktop.
Save bmneely/5639465 to your computer and use it in GitHub Desktop.
SS Migration
class ConvertSharedSecretToSerializable < ActiveRecord::Migration
def change
add_column :accounts, :all_shared_secrets, :text
Account.find_each do |a|
a.all_shared_secrets.push(a[:shared_secret])
a.save!
end
remove_column :accounts, :shared_secret
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment