diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb index 41b43a51a..d0d754482 100644 --- a/app/helpers/tags_helper.rb +++ b/app/helpers/tags_helper.rb @@ -37,10 +37,4 @@ module TagsHelper html.html_safe end - - def tag_post_count_style(tag) - @highest_post_count ||= Tag.highest_post_count - width_percent = Math.log([tag.post_count, 1].max, @highest_post_count) * 100 - "background: linear-gradient(to left, #DDD #{width_percent}%, white #{width_percent}%)" - end end diff --git a/app/models/tag.rb b/app/models/tag.rb index 2785325a0..eaeb1fe79 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -91,12 +91,6 @@ class Tag < ApplicationRecord extend ActiveSupport::Concern module ClassMethods - def highest_post_count - Cache.get("highest-post-count", 4.hours) do - select("post_count").order("post_count DESC").first.post_count - end - end - def increment_post_counts(tag_names) Tag.where(:name => tag_names).update_all("post_count = post_count + 1") end diff --git a/app/views/tags/index.html.erb b/app/views/tags/index.html.erb index 0a6d6fa08..c09eaa3aa 100644 --- a/app/views/tags/index.html.erb +++ b/app/views/tags/index.html.erb @@ -12,7 +12,7 @@
<% @tags.each do |tag| %>