fix for negative post counts

This commit is contained in:
albert
2012-01-07 21:35:26 -05:00
parent fd4cf15e46
commit 8c5db7caba

View File

@@ -334,7 +334,7 @@ class Tag < ActiveRecord::Base
end
def related_cache_expiry
base = Math.sqrt(post_count)
base = Math.sqrt([post_count, 0].max)
if base > 24
24
else