|
|
|
@ -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])
|
|
|
|
|
@comment.content = params[:org_content]
|
|
|
|
|
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|
|
|
|
|
|