Skip to content

Instantly share code, notes, and snippets.

@procload
Created October 11, 2010 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save procload/620998 to your computer and use it in GitHub Desktop.
Save procload/620998 to your computer and use it in GitHub Desktop.
module PublicHelper
include Twitter::Autolink
def display_tweets(team)
html_content = []
@tweets = Tweet.where(:team_hash => team).limit(10).order_by([[:created_at, :desc]])
@tweets.each do |tweet|
html_content << content_tag(:li, :class => 'group') do
"<img src='"+tweet.profile_image_url+"' />"
content_tag(:div, :class => 'post') do
"<h3> " + auto_link_usernames_or_lists("@#{tweet.username}") + " <span>" + tweet.name + "</span>" + "</h3>" + "<p>" + tweet.text + "</p>"
end
end
end
html_content
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment