Consider:
def first_login?
if (self.sign_in_count <= 20)
return true
else
return false
end
end
It would be nice if I could just have it be 1 line of code...if possible.
Consider:
def first_login?
if (self.sign_in_count <= 20)
return true
else
return false
end
end
It would be nice if I could just have it be 1 line of code...if possible.
Your comparison already returns boolean value
You don't need
self
as well because methods are invoked on self implicitly