canvas-lms/db/migrate/20150514193537_encrypt_link...

12 lines
287 B
Ruby

class EncryptLinkedInSettings < ActiveRecord::Migration
tag :predeploy
def up
PluginSetting.where(name: 'linked_in').each do |ps|
ps.settings[:client_id] = ps.settings[:api_key]
ps.settings[:client_secret] = ps.settings[:secret_key]
ps.save!
end
end
end