Commit fcfefaaf48b2f0dd5a288435235052bdc3e6c58b
Fixed reference to ActiveRecord::Base#hash.
(h/t Winson) git-svn-id: http://bcrypt-ruby.rubyforge.org/svn/trunk@29 b1e0f299-433e-4bb3-9895-84128a6cfb6acodahale committed on 5/3/2007, 8:58:35 AM
Parent: c211044e69bffa78b9bb58feb9cadea7120f139d
Files changed
README | changed |
README | |||
---|---|---|---|
@@ -25,18 +25,18 @@ | |||
25 | 25 … | ||
26 | 26 … | require 'bcrypt' | |
27 | 27 … | ||
28 | 28 … | class User < ActiveRecord::Base | |
29 | - # users.hash in the database is a :string | ||
29 … | + # users.password_hash in the database is a :string | ||
30 | 30 … | include BCrypt | |
31 | 31 … | ||
32 | 32 … | def password | |
33 | - @password ||= Password.new(hash) | ||
33 … | + @password ||= Password.new(password_hash) | ||
34 | 34 … | end | |
35 | 35 … | ||
36 | 36 … | def password=(new_password) | |
37 | 37 … | @password = Password.create(new_password) | |
38 | - self.hash = @password | ||
38 … | + self.password_hash = @password | ||
39 | 39 … | end | |
40 | 40 … | ||
41 | 41 … | end | |
42 | 42 … |
Built with git-ssb-web