artists/tags subnav: prefer direct tag count over Post#fast_count.

This commit is contained in:
evazion
2018-10-01 12:53:07 -05:00
parent 02156f3f34
commit eeadd1ef11
2 changed files with 2 additions and 2 deletions

View File

@@ -8,7 +8,7 @@
<%= subnav_link_to "URLs", artist_urls_path %>
<% if @artist && !@artist.new_record? %>
<li>|</li>
<%= subnav_link_to "Posts (#{Post.fast_count(@artist.name)})", posts_path(:tags => @artist.name) %>
<%= subnav_link_to "Posts (#{@artist.tag.try(:post_count).to_i})", posts_path(:tags => @artist.name) %>
<%= subnav_link_to "Show", artist_path(@artist) %>
<% if CurrentUser.is_member? %>
<%= subnav_link_to "Edit", edit_artist_path(@artist), :"data-shortcut" => "e" %>