You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20110223180953_salt_user_passwords.rb 387B

12345678910111213
  1. class SaltUserPasswords < ActiveRecord::Migration[4.2]
  2. def self.up
  3. say_with_time "Salting user passwords, this may take some time..." do
  4. User.salt_unsalted_passwords!
  5. end
  6. end
  7. def self.down
  8. # Unsalted passwords can not be restored
  9. raise ActiveRecord::IrreversibleMigration, "Can't decypher salted passwords. This migration can not be rollback'ed."
  10. end
  11. end