From 200071922761b5c0fbe0604b3447a3857f10f014 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 29 Nov 2017 13:12:53 -0600 Subject: [PATCH] /wiki_pages: get navbar post count from tags table. Post.fast_count is dependent on the current user's settings. This meant that tag counts in wiki pages could be different from the tag counts displayed in tag lists. --- app/views/wiki_pages/_secondary_links.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/wiki_pages/_secondary_links.html.erb b/app/views/wiki_pages/_secondary_links.html.erb index ccb04ecf0..17f9a5758 100644 --- a/app/views/wiki_pages/_secondary_links.html.erb +++ b/app/views/wiki_pages/_secondary_links.html.erb @@ -12,7 +12,7 @@ <% if @wiki_page && !@wiki_page.new_record? %>
  • |
  • -
  • <%= link_to "Posts (#{Post.fast_count(@wiki_page.title)})", posts_path(:tags => @wiki_page.title) %>
  • +
  • <%= link_to "Posts (#{@wiki_page.tag.try(:post_count) || 0})", posts_path(:tags => @wiki_page.title) %>
  • <%= link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %>
  • <% if CurrentUser.is_member? %>
  • <%= link_to "Edit", edit_wiki_page_path(@wiki_page) %>