From 8592c13ed4d887c740d4d11c34b91d4b0d1f870a Mon Sep 17 00:00:00 2001 From: Luka Murn Date: Thu, 25 Aug 2016 13:37:49 +0200 Subject: [PATCH] Remove now obsolote controller actions --- app/controllers/projects_controller.rb | 71 ------------------------- app/controllers/protocols_controller.rb | 25 --------- 2 files changed, 96 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index b90408350..a9b04b088 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -33,77 +33,6 @@ class ProjectsController < ApplicationController @project = Project.new end - def update_comment_modules - id = request.request_parameters[:id] - msg = request.request_parameters[:msg] - - Comment.where(id:id).update_all(message:msg) - - rb_json = JSON.parse('{"json":['+id+']}') - respond_to do |format| - format.json {render json: rb_json["json"]} - end - end - - def delete_comment_modules - id = request.request_parameters[:id] - - MyModuleComment.where(comment_id:id).destroy_all - Comment.find(id).destroy - - rb_json = JSON.parse('{"json":['+id+']}') - respond_to do |format| - format.json {render json: rb_json["json"]} - end - end - - def update_comment_projects - id = request.request_parameters[:id] - msg = request.request_parameters[:msg] - - Comment.where(id:id).update_all(message:msg) - - rb_json = JSON.parse('{"json":['+id+']}') - respond_to do |format| - format.json {render json: rb_json["json"]} - end - end - - def delete_comment_projects - id = request.request_parameters[:id] - - ProjectComment.where(comment_id:id).destroy_all - Comment.find(id).destroy - - rb_json = JSON.parse('{"json":['+id+']}') - respond_to do |format| - format.json {render json: rb_json["json"]} - end - end - - def update_comment_results - id = request.request_parameters[:id] - msg = request.request_parameters[:msg] - - Comment.where(id:id).update_all(message:msg) - - rb_json = JSON.parse('{"json":['+id+']}') - respond_to do |format| - format.json {render json: rb_json["json"]} - end - end - - def delete_comment_results - id = request.request_parameters[:id] - - ResultComment.where(comment_id:id).destroy_all - - rb_json = JSON.parse('{"json":['+id+']}') - respond_to do |format| - format.json {render json: rb_json["json"]} - end - end - def archive @filter_by_archived = true index diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index 68b5ac375..29705c8ba 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -67,31 +67,6 @@ class ProtocolsController < ApplicationController def index end - def update_comment - id = request.request_parameters[:id] - msg = request.request_parameters[:msg] - - Comment.where(id:id).update_all(message:msg) - - rb_json = JSON.parse('{"json":['+id+']}') - respond_to do |format| - format.json {render json: rb_json["json"]} - end - end - - def delete_comment - id = request.request_parameters[:id] - - - StepComment.where(comment_id:id).destroy_all - Comment.find(id).destroy - - rb_json = JSON.parse('{"json":['+id+']}') - respond_to do |format| - format.json {render json: rb_json["json"]} - end - end - def datatable respond_to do |format| format.json {