Created
July 8, 2013 21:32
-
-
Save johno/5952694 to your computer and use it in GitHub Desktop.
Clean up some ternary statements.
This file contains 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
device["signal_strength"] == nil ? '0' : device["signal_strength"] | |
# You can also can use the following: | |
device['signal_strength'] || 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment