Skip to content

Instantly share code, notes, and snippets.

@mbchoa
Last active August 29, 2015 13:56
Show Gist options
  • Save mbchoa/8875588 to your computer and use it in GitHub Desktop.
Save mbchoa/8875588 to your computer and use it in GitHub Desktop.
"Archive" HTML+ERB gist
<h2>ARCHIVE</h2>
<ol>
<% blog.articles.group_by {|a| a.date.year }.each do |year, articles| %>
<li><%= link_to year, blog_year_path(year) %></li>
<% end %>
</ol>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment