<% group_list.each do |letter| %> <% if params[:id] == letter %> <%= content_tag "span", letter, :class => "active" %> <% else %> <%= link_to letter, {:action=>"journal_list", :id=>letter} %> <% end %> <% end %>