-
-
Save pjb3/327879 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# best way to code: if event is nil, true, otherwise if event.user == user true, else false | |
# seems clear but is so vertically long for such a simple thing | |
if event | |
event.user == user | |
else | |
true | |
end | |
# nice and compact but wtf does it mean | |
event.nil? || event.user == user | |
# winner winner? | |
(event && event.user == user) || true | |
# other thoughts? fork away | |
event ? event.user == user : true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment