Migrating passwords to Devise
问题 I'm migration users database from PHP to Rails. I have already instaled Devise Gem and it is working well now. Also, I have found a hint how to migrate existing users' passwords to Rails I have added old passwords to same encrypted_password field as Devise holds, so when devise fails to auth, checking for old password: # user.rb def valid_password?(password) return false if encrypted_password.blank? require 'digest/sha1' password_salt = 'my_php_framework_salt' Devise.secure_compare(Digest: