Last active
August 29, 2015 13:55
-
-
Save DanielHeath/8778730 to your computer and use it in GitHub Desktop.
Today in code
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
def int_to_bool value | |
value == "0" ? false : true | |
end |
Integer zero is not actually == to string zero :/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was inside a class which is only defined when an environment variable is set.