about summary refs log tree commit diff
path: root/app/controllers/tags_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-01 16:26:25 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-01 16:26:25 +0100
commit1d0321fc4556b947c8b3482d7bef631b0ccf038b (patch)
tree32fd569f3b8324fe30506aa5894d3f8661d5a56c /app/controllers/tags_controller.rb
parentbdf7d8f8fd09dfa3a9182c575a3101c73ecc543f (diff)
Fix pt translations, improve pre-cache queries, removing will_paginate
from accounts/tags because it's a terribly inefficient way to paginate
large sets of data
Diffstat (limited to 'app/controllers/tags_controller.rb')
-rw-r--r--app/controllers/tags_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index a6b359485..4a70b2a8f 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -4,6 +4,7 @@ class TagsController < ApplicationController
   layout 'public'
 
   def show
-    @statuses = Tag.find_by!(name: params[:id].downcase).statuses.order('id desc').with_includes.with_counters.paginate(page: params[:page], per_page: 10)
+    @statuses = Tag.find_by!(name: params[:id].downcase).statuses.order('id desc').paginate_by_max_id(20, params[:max_id] || nil)
+  	@statuses = cache_collection(@statuses, Status)
   end
 end