<% cache "#{__FILE__}/latest_tweet", :ttl => 43.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 => 47.minutes do %> <% blog_post = ::BrighterPlanetLayout.latest_blog_post -%> <% if blog_post %>

<%= blog_post.author %> posted <%= link_to blog_post.title, blog_post.link %> <%= 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 %>