Revert "Fetch post counts instead of relying on the estimate"

This reverts commit e50094f588.
This commit is contained in:
Kira 2020-01-23 08:56:59 -08:00
parent e50094f588
commit 52bf44cc8f
3 changed files with 2 additions and 12 deletions

View File

@ -67,9 +67,6 @@ end
group :development do
gem 'sinatra'
gem 'rack-mini-profiler'
gem 'flamegraph'
gem 'stackprof'
end
group :development, :test do

View File

@ -157,7 +157,6 @@ GEM
ffi (1.11.3-x64-mingw32)
ffi-win32-extensions (1.0.3)
ffi
flamegraph (0.9.5)
get_process_mem (0.2.5)
ffi (~> 1.0)
globalid (0.4.2)
@ -267,8 +266,6 @@ GEM
win32-file (>= 0.7.0)
public_suffix (4.0.2)
rack (2.0.8)
rack-mini-profiler (1.1.4)
rack (>= 1.2.0)
rack-protection (2.0.8.1)
rack
rack-proxy (0.6.5)
@ -371,7 +368,6 @@ GEM
sshkit (1.20.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stackprof (0.2.15)
statistics2 (0.54)
streamio-ffmpeg (3.0.2)
multi_json (~> 1.8)
@ -450,7 +446,6 @@ DEPENDENCIES
elasticsearch-rails
factory_bot
ffaker
flamegraph
httparty
jquery-rails
listen
@ -466,7 +461,6 @@ DEPENDENCIES
pg
pry-byebug
ptools
rack-mini-profiler
radix62 (~> 1.0.1)
rails (~> 6.0)
rakismet
@ -486,7 +480,6 @@ DEPENDENCIES
simple_form
simplecov
sinatra
stackprof
statistics2
streamio-ffmpeg
timecop

View File

@ -126,9 +126,9 @@ module PostSets
def posts
@posts ||= begin
if raw
temp = ::Post.raw_tag_match(tag_string).paginate(page, count: get_post_count, limit: per_page, includes: [:uploader])
temp = ::Post.raw_tag_match(tag_string).paginate(page, count: post_count, :limit => per_page, includes: [:uploader])
else
temp = ::Post.tag_match(tag_string).paginate(page, count: get_post_count, limit: per_page, includes: [:uploader])
temp = ::Post.tag_match(tag_string).paginate(page, count: post_count, :limit => per_page, includes: [:uploader])
end
@post_count = temp.total_count