fix fast_count

This commit is contained in:
albert
2013-02-20 16:08:14 -05:00
parent b5064d197c
commit 2954118663
2 changed files with 3 additions and 2 deletions

View File

@@ -602,7 +602,7 @@ class Post < ActiveRecord::Base
count = get_count_from_cache(tags)
if count.nil?
fast_count_search(tags)
count = fast_count_search(tags)
end
end
@@ -623,6 +623,8 @@ class Post < ActiveRecord::Base
if count > Danbooru.config.posts_per_page * 10
set_count_in_cache(tags, count)
end
count
end
end

View File

@@ -70,7 +70,6 @@ module Danbooru
# taken from kaminari (https://github.com/amatsuda/kaminari)
def total_count
raise if @paginator_options[:count] == 0
return @paginator_options[:count] if @paginator_options[:count]
c = except(:offset, :limit, :order)