story list detail: put all media tags first, not just pdf

This commit is contained in:
joshua stein 2014-08-03 20:56:02 -05:00
parent 8a3b133d87
commit b70ec7a44e

View file

@ -24,7 +24,7 @@ class="story <%= story.vote == 1 ? "upvoted" : "" %> <%= story.vote == -1 ?
<% if story.can_be_seen_by_user?(@user) %>
<span class="tags">
<% story.taggings.sort_by{|t| t.tag.tag }.sort_by{|t|
t.tag.tag == "pdf" ? -1 : 0 }.each do |tagging| %>
t.tag.is_media?? -1 : 0 }.each do |tagging| %>
<a href="<%= tag_url(tagging.tag.tag) %>"
class="<%= tagging.tag.css_class %>"
title="<%= tagging.tag.description %>"><%= tagging.tag.tag %></a>