讨论区计算回复数的一个BUG

This commit is contained in:
yuanke 2016-05-05 14:52:58 +08:00
parent 9dc92fe817
commit b82a1c1162
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ class BoardsController < ApplicationController
if @order.to_i == 2
@type = 2
@topics.each do |topic|
topic[:infocount] = get_praise_num(topic) + (topic.parent ? x.parent.children.count : topic.children.count)
topic[:infocount] = get_praise_num(topic) + (topic.parent ? topic.parent.children.count : topic.children.count)
if topic[:infocount] < 0
topic[:infocount] = 0
end