Skip to content

Instantly share code, notes, and snippets.

Created November 30, 2011 11:21
Show Gist options
  • Save anonymous/1408742 to your computer and use it in GitHub Desktop.
Save anonymous/1408742 to your computer and use it in GitHub Desktop.
<li>
<ul class="weeks">
<li>Week</li>
<% navigation_weeks.each do |w| %>
<li class="<%= (controller_name == "posts" || controller_name == "things") && params[:action]=="index" && params[:week].present? && params[:year].present? && params[:week]==w.week.to_s && params[:year]==w.year.to_s ? 'active' : '' %>"><%= link_to "#{w.week} <span class='#{week_month(w.week, w.year).downcase}'>#{week_month(w.week, w.year)}</span>".html_safe, posts_path(:week => w.week, :year => w.year), :class => 'tip', :title => week_dates(w.week, w.year) %></li>
<% end %>
</ul>
</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment