⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
def twitter_link(handle) | |
avatars_path = 'public/img/avatars/' | |
avatar = handle + '.jpg' | |
avatar_path = avatars_path + avatar | |
img_tag = "<img src='#{avatar_path.sub(/^public/, '')}' />" | |
# Check and see if there's already an avatar. | |
unless File.exists?(avatar_path) | |
# We don't have it. Let's try to get it from Twitter. | |
begin |