jordanbyron/rstat.us — comment on commit 49b739101d4e6c94c512d597badc7b00ab7dd3a2
File: app/controllers/users_controller.rb line 54
By clnclarinet:

Shouldn't it be || rather than &&? I always have to think about "unless" a bit more, and it's been a while since DeMorgan's Law, so I want to run this by you and make sure this is what you meant:

Original statement is equiv to: `if !@user.email_confirmed`
Desired new logic added is equiv to: `if !@user.email.blank?`
And we only want to send the email if both of those are true: `if !@user.email.blank? && !@user.email_confirmed`
And if we factor out the bangs to change the if to unless, then the && has to change to ||: `unless @user.email.blank? || @user.email_confirmed`

Awesome that you caught this :tophat: