File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -101,14 +101,14 @@ Here's an example of how this feature can be used:
101
101
102
102
``` ruby
103
103
class User < ActiveRecord ::Base
104
- has_secure_password
105
-
106
- generates_token_for :password_reset , expires_in: 15 .minutes do
107
- # A password's BCrypt salt changes when the password is updated.
108
- # By embedding (part of) the salt in a token, the token will
109
- # expire when the password is updated.
110
- BCrypt ::Password .new (password_digest).salt[- 10 ..]
111
- end
104
+ has_secure_password
105
+
106
+ generates_token_for :password_reset , expires_in: 15 .minutes do
107
+ # A password's BCrypt salt changes when the password is updated.
108
+ # By embedding (part of) the salt in a token, the token will
109
+ # expire when the password is updated.
110
+ BCrypt ::Password .new (password_digest).salt[- 10 ..]
111
+ end
112
112
end
113
113
114
114
user = User .first
You can’t perform that action at this time.
0 commit comments