fix for negative post counts
This commit is contained in:
@@ -334,7 +334,7 @@ class Tag < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def related_cache_expiry
|
def related_cache_expiry
|
||||||
base = Math.sqrt(post_count)
|
base = Math.sqrt([post_count, 0].max)
|
||||||
if base > 24
|
if base > 24
|
||||||
24
|
24
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user