From 1ff5fd06120a1595561316a1ea6099741d42673b Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Wed, 22 Jun 2022 09:59:18 +0100 Subject: [PATCH] Remove references to current user --- app/controllers/case_logs_controller.rb | 2 -- app/controllers/form_controller.rb | 1 - app/models/form.rb | 1 - 3 files changed, 4 deletions(-) diff --git a/app/controllers/case_logs_controller.rb b/app/controllers/case_logs_controller.rb index aa7a4fe24..876e337ff 100644 --- a/app/controllers/case_logs_controller.rb +++ b/app/controllers/case_logs_controller.rb @@ -28,7 +28,6 @@ class CaseLogsController < ApplicationController def create case_log = CaseLog.new(case_log_params) - case_log.form.current_user = current_user respond_to do |format| format.html do case_log.save! @@ -62,7 +61,6 @@ class CaseLogsController < ApplicationController format.html { edit } format.json do if @case_log - @case_log.form.current_user = current_user render json: @case_log, status: :ok else render_not_found_json("Log", params[:id]) diff --git a/app/controllers/form_controller.rb b/app/controllers/form_controller.rb index 9dde2fc43..46cffbe13 100644 --- a/app/controllers/form_controller.rb +++ b/app/controllers/form_controller.rb @@ -25,7 +25,6 @@ class FormController < ApplicationController if @case_log current_url = request.env["PATH_INFO"] subsection = @case_log.form.get_subsection(current_url.split("/")[-2]) - @case_log.form.current_user = current_user render "form/check_answers", locals: { subsection: } else render_not_found diff --git a/app/models/form.rb b/app/models/form.rb index 38c2523f7..29c62e40d 100644 --- a/app/models/form.rb +++ b/app/models/form.rb @@ -2,7 +2,6 @@ class Form attr_reader :form_definition, :sections, :subsections, :pages, :questions, :start_date, :end_date, :type, :name, :setup_definition, :setup_sections, :form_sections - attr_accessor :current_user include Form::Setup