<ul class="tabs" data-tab>
  <li class="tab-title active"><a href="#panel1">Recent Snippets</a></li>
  <li class="tab-title"><a href="#panel2">Popular Snippets</a></li>
  <li class="tab-title"><a href="#panel3">Recent Stories</a></li>
  <li class="tab-title"><a href="#panel4">Popular Stories</a></li>
</ul>
<div class="tabs-content">
  <div class="content active" id="panel1">
    <p>
      <% @recent_snippets.each do |recent| %>
        <%= link_to recent.content, snippet_path(recent) %>
      <% end %>
    </p>
  </div>
  <div class="content" id="panel2">
    <p>
      <% @popular_snippets.each do |snippet| %>
        <% snippet.each do |snippet, stories_count| %>
          <%= link_to "#{snippet.content} (#{stories_count})", snippet_path(snippet) %>
        <% end %>
      <% end %>
    </p>
  </div>
  <div class="content" id="panel3">
    <p>This is the third panel of the basic tab example. This is the third panel of the basic tab example.</p>
  </div>
  <div class="content" id="panel4">
    <p>This is the fourth panel of the basic tab example. This is the fourth panel of the basic tab example.</p>
  </div>
</div>

<ul class="tabs" data-tab>
  <li class="tab-title active"><a href="#panel1">Recent Snippets</a></li>
  <li class="tab-title"><a href="#panel2">Popular Snippets</a></li>
  <li class="tab-title"><a href="#panel3">Recent Stories</a></li>
  <li class="tab-title"><a href="#panel4">Popular Stories</a></li>
</ul>
<div class="tabs-content">
  <div class="content active" id="panel1">
    <p>
      <% @recent_snippets.each do |recent| %>
        <%= link_to recent.content, snippet_path(recent) %>
      <% end %>
    </p>
  </div>
  <div class="content" id="panel2">
    <p>
      <% @popular_snippets.each do |snippet| %>
        <% snippet.each do |snippet, stories_count| %>
          <%= link_to "#{snippet.content} (#{stories_count})", snippet_path(snippet) %>
        <% end %>
      <% end %>
    </p>
  </div>
  <div class="content" id="panel3">
    <p>
      <% @recent_stories.each do |recent| %>
        <%= link_to recent.title, story_path(recent) %>
      <% end %>
    </p>
  </div>
  <div class="content" id="panel4">
    <p>
      <% @popular_stories.each do |story| %>
        <% story.each do |story, votes| %>
          <%= link_to "#{story.title} (#{votes})", story_path(story) %>
        <% end %>
      <% end %>
    </p>
  </div>
</div>

Add popular stories and recent stories tab
Add popular stories and recent stories tab
