I didn’t see this mentioned anywhere in the Rails Guide or in my admittedly cursory Google searches, but apparently it’s possible to create named redirect routes in Rails 3. For example:

1 2 3 4
Myapplication::Application.routes.draw do
match "/facebook" => redirect("http://www.facebook.com/pages/MarkZuckerbergFanClub/12345678"), :as => 'facebook'
match "/twitter" => redirect("http://twitter.com/TweetyMcTweet"), :as => 'twitter'
end
view raw routes.rb This Gist brought to you by GitHub.

Then you can use those in your layouts like so:

1 2 3 4
<ul class="social-links">
<li class="facebook"><%= link_to "Like us on Facebook", facebook_path %></li>
<li class="twitter"><%= link_to "Follow us on Twitter", twitter_path %></li>
</ul>