diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2010-12-18 13:38:05 -0800 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2010-12-18 13:38:05 -0800 |
commit | bcf4e4f2b02157cecc1f1727a95cdf5bfa471771 (patch) | |
tree | b38232fb127a25817aa25d3b8976d218948119e3 /activemodel/test/models | |
parent | d9b732fcadc001b6757e648761acf97833827b58 (diff) | |
download | rails-bcf4e4f2b02157cecc1f1727a95cdf5bfa471771.tar.gz rails-bcf4e4f2b02157cecc1f1727a95cdf5bfa471771.tar.bz2 rails-bcf4e4f2b02157cecc1f1727a95cdf5bfa471771.zip |
Added ActiveRecord::Base#has_secure_password (via ActiveModel::SecurePassword) to encapsulate dead-simple password usage with SHA2 encryption and salting
Diffstat (limited to 'activemodel/test/models')
-rw-r--r-- | activemodel/test/models/user.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activemodel/test/models/user.rb b/activemodel/test/models/user.rb new file mode 100644 index 0000000000..e221bb8091 --- /dev/null +++ b/activemodel/test/models/user.rb @@ -0,0 +1,8 @@ +class User + include ActiveModel::Validations + include ActiveModel::SecurePassword + + has_secure_password + + attr_accessor :password_digest, :password_salt +end |