详情页面留言为空的问题
This commit is contained in:
parent
67f0cad331
commit
49406681ef
|
@ -96,7 +96,12 @@ class OrgDocumentCommentsController < ApplicationController
|
|||
def add_reply_in_doc
|
||||
@document = OrgDocumentComment.find(params[:id]).root
|
||||
@comment = OrgDocumentComment.new(:organization_id => @document.organization_id, :creator_id => User.current.id, :reply_id => params[:id])
|
||||
if params[:org_comment].blank?
|
||||
@comment.content = params[:org_content]
|
||||
else
|
||||
@comment.content = params[:org_comment][:org_content]
|
||||
end
|
||||
|
||||
@document.children << @comment
|
||||
@document.save
|
||||
respond_to do |format|
|
||||
|
|
Loading…
Reference in New Issue