Module: Georgia::TwitterHelper
- Defined in:
- app/helpers/georgia/twitter_helper.rb
Instance Method Summary collapse
Instance Method Details
#auto_link_tweet(tweet) ⇒ Object
15 16 17 18 19 20 21 |
# File 'app/helpers/georgia/twitter_helper.rb', line 15 def auto_link_tweet tweet if tweet.in_reply_to_screen_name auto_link(tweet.text.gsub(/(@\w+)/, link_to("@#{tweet.in_reply_to_screen_name}", "http://twitter.com/#{tweet.in_reply_to_screen_name}"))).html_safe else auto_link(tweet.text).html_safe end end |
#tweets_for(account) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'app/helpers/georgia/twitter_helper.rb', line 4 def tweets_for account begin @tweets ||= Twitter.user_timeline(account) rescue Exception => ex logger.error "Twitter retrieval: " << ex. ensure @tweets ||= [] end @tweets end |