To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 7f / 7ff580843dffaee1ae5e2a96cf519330f6f872bc.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (384 Bytes)
| 1 |
class SaltUserPasswords < ActiveRecord::Migration |
|---|---|
| 2 |
|
| 3 |
def self.up |
| 4 |
say_with_time "Salting user passwords, this may take some time..." do |
| 5 |
User.salt_unsalted_passwords! |
| 6 |
end |
| 7 |
end |
| 8 |
|
| 9 |
def self.down |
| 10 |
# Unsalted passwords can not be restored |
| 11 |
raise ActiveRecord::IrreversibleMigration, "Can't decypher salted passwords. This migration can not be rollback'ed." |
| 12 |
end |
| 13 |
end |