|
|
|
@ -28,6 +28,7 @@ class OrgDocumentCommentsController < ApplicationController
|
|
|
|
|
redirect_to new_org_document_comment_path(:organization_id => @organization.id)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def show
|
|
|
|
|
@document = OrgDocumentComment.find(params[:id])
|
|
|
|
|
end
|
|
|
|
@ -39,10 +40,12 @@ class OrgDocumentCommentsController < ApplicationController
|
|
|
|
|
render_403
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def update
|
|
|
|
|
@org_document = OrgDocumentComment.find(params[:id])
|
|
|
|
|
@org_document.update_attributes(:title => params[:org_document_comment][:title], :content => params[:org_document_comment][:content])
|
|
|
|
|
@org_document.save_attachments(params[:attachments])
|
|
|
|
|
Attachment.attach_files(@org_document, params[:attachments])
|
|
|
|
|
# @org_document.save_attachments(params[:attachments])
|
|
|
|
|
if @org_document.parent.nil?
|
|
|
|
|
act = OrgActivity.where("org_act_type='OrgDocumentComment' and org_act_id =?", @org_document.id).first
|
|
|
|
|
act.update_attributes(:updated_at => @org_document.updated_at)
|
|
|
|
|