@ -32,9 +32,9 @@ class CommentsController < ApplicationController
# 列表
def index
disscusses = @hack.discusses.where(:root_id => nil)
@disscuss_count = disscusses.count
@disscusses= paginate disscusses
discusses = @hack.discusses.where(:root_id => nil)
@discusses_count = discusses.count
@discusses= paginate discusses
end
# 删除
@ -1,4 +1,4 @@
json.disscuss_count @disscuss_count
json.disscuss_count @discusses
json.comments @discusses do |discuss|
json.partial! 'comments/discuss', locals: { discuss: discuss}
json.children discuss.child_discuss(current_user) do |c_d|