<% cache "#{__FILE__}/latest_tweet", :ttl => 3.minutes do %> <% tweet = ::BrighterPlanetLayout.latest_tweet -%> <% if tweet %>

<%= auto_link tweet.description.sub('brighterplanet: ', '') %> via <%= link_to '@brighterplanet', 'http://twitter.com/brighterplanet' %>

<% else %>

Check out our Twitter feed via @brighterplanet

<% end %> <% end %> <% cache "#{__FILE__}/latest_blog_post", :ttl => 3.minutes do %> <% blog_post = ::BrighterPlanetLayout.latest_blog_post -%> <% if blog_post %>

<%= link_to blog_post.title, blog_post.link %> by <%= blog_post.author %> <%= time_ago_in_words blog_post.updated %> ago on <%= link_to 'Safety in Numbers', 'http://numbers.brighterplanet.com' %>, our blog

<% else %>

See the latest posts by Andy on Safety in Numbers, our blog

<% end %> <% end %>