Created
February 1, 2011 19:09
-
-
Save adambair/806405 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
| def interests_text | |
| interests = [] | |
| interests << 'Design' if 'design' | |
| interests << 'Web Development' if 'web' | |
| interests << 'Mobile Development' if 'mobile' | |
| interests << 'Strategy' if 'strategy' | |
| interests << 'Products' if 'products' | |
| interests << 'Other' if 'other' | |
| interests | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found this beauty today -- "warning: string literal in condition" - no doubt. wtf. This code will always return an array of all of the items listed. "warning: string literal in condition" is there for a reason. SIGH.