Truthiness

suggest change

Remarks

As a rule of thumb, avoid using double-negations in code. Rubocop says that double negations are unnecessarily complex and can often be replaced with something more readable.

Instead of writing

def user_exists?
    !!user
end

use

def user_exists?
    !user.nil?
end

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents