Skip to content

Commit

Permalink
Update stats_controller.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren authored May 19, 2020
1 parent 51d21a5 commit 9c726fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/stats_controller.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
class StatsController < ApplicationController
def subscriptions
Rails.cache.fetch("stats/subscriptions/query", expires_in: 24.hours) do
@tags = TagSelection.where(following: true)
.joins("LEFT JOIN community_tags ON community_tags.tid = tag_selections.tid")
.joins(:tag)
.group("term_data.name")
.count
# Rails.cache.fetch("stats/subscriptions/query", expires_in: 24.hours) do
# @tags = TagSelection.where(following: true)
# .joins("LEFT JOIN community_tags ON community_tags.tid = tag_selections.tid")
# .joins(:tag)
Expand All @@ -14,7 +14,7 @@ def subscriptions
# .group("term_data.name")
# .count
@tags = @tags.group_by { |_k, v| v / 10 }
end
# end
end

def range
Expand Down

0 comments on commit 9c726fd

Please sign in to comment.