short circuit evaluation  

Ruby doesn’t look at both expressions unless it has to; if it sees

false && true

it stops reading as soon as it sees && because it knows false && anything must be false.

 
0
Kudos
 
0
Kudos

Now read this

using has_secure_password

For authentication, we need to do following three: to model, has_secure_password to table, password_digest bundle bcrypt gem So, we add has_secure_password to User model, has_secure_password and it requires gem ‘bcrypt-ruby’ to the... Continue →