From e98899916b9271e96990fbe91e058e6607346f4c Mon Sep 17 00:00:00 2001 From: Coraline Date: Sun, 8 Dec 2024 16:41:44 -0600 Subject: [PATCH] Interim checkin --- app/controllers/responses_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/responses_controller.rb b/app/controllers/responses_controller.rb index 07a3d4e..df85db7 100644 --- a/app/controllers/responses_controller.rb +++ b/app/controllers/responses_controller.rb @@ -2,7 +2,10 @@ class ResponsesController < ApplicationController def update @response = Response.find(params[:id]) - success = @response.update(raw_codes: response_params[:raw_codes].join(",").split(",").reject(&:empty?).compact.map(&:strip).map(&:downcase)) + Rails.logger.info("!!! => response_params[:raw_codes] = #{response_params[:raw_codes]}") + + raw_codes = response_params[:raw_codes].first.parse_csv.map(&:strip).reject(&:empty?).compact.map(&:downcase) + success = @response.update(raw_codes: raw_codes) respond_to do |format| format.turbo_stream do