Secure Passwords With Rails And Bcrypt
class User < ActiveRecord::Base
has_secure_password
# other logic ...
enduser = User.find_by(email: user_params[:email])
if user.authenticate(user_params[:password])
puts 'That is the correct password!'
else
puts 'That password did not match!'
endLast updated