You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rails6/en/chapter03-presenting-users.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,7 +183,7 @@ end
183
183
----
184
184
# ...
185
185
test 'user with invalid email should be invalid' do
186
-
user = User.new(email: 'test', password: 'test')
186
+
user = User.new(email: 'test', password_digest: 'test')
187
187
assert_not user.valid?
188
188
end
189
189
----
@@ -249,7 +249,7 @@ gem "bcrypt", "~> 3.1"
249
249
250
250
NOTE: Version 3.1 of bcrypt is the current version at the time of writing. It may therefore vary for your case.
251
251
252
-
Active Record offers us a method https://github.com/rails/rails/blob/6-0-stable/activemodel/lib/active_model/secure_password.rb#L61[`ActiveModel::SecurePassword::has_secure_password`] that will interface with Bcrypt and hack the password for us very easily.
252
+
Active Record offers us a method https://github.com/rails/rails/blob/6-0-stable/activemodel/lib/active_model/secure_password.rb#L61[`ActiveModel::SecurePassword::has_secure_password`] that will interface with Bcrypt and hash the password for us very easily.
0 commit comments