|
|
|
@ -32,6 +32,7 @@ class CommentsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
# 列表
|
|
|
|
|
def index
|
|
|
|
|
logger.info("##########hack:#{@hack.id}")
|
|
|
|
|
discusses = Discuss.where(root_id: nil, dis_id: @hack.id, dis_type: @hack.class.to_s)
|
|
|
|
|
@discusses_count = discusses.count
|
|
|
|
|
@discusses= paginate discusses
|
|
|
|
@ -46,7 +47,7 @@ class CommentsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
def find_hack
|
|
|
|
|
@hack = Hack.find_by_identifier params[:identifier]
|
|
|
|
|
@hack = Hack.find_by_identifier(params[:identifier])
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def comment_params
|
|
|
|
|